I have a little bit special requirements. For me, often it makes no sence to create a revision for a minor change like deleting returns or something like that. So I do not want to force the editor to create a revision in any case. I want to give him the power to choose wheter to create a revision or not. But if he creates a revision I want him to force to insert a log message.
Is it possible to insert that feature?
Comments
Comment #1
mdupontThis is a special case that will better fit in a custom module. It should be easy to do: to avoid giving users the "administer nodes" permission to allow them to choose the revision status, implement a new permission like "switch revision status", do a form_alter to link allow users with this permission to (un)check the revision checkbox , and it should work.
Enforce_revlog module has an AJAX event triggered when the revision checkbox is (un)checked and will adapt automatically. So if it's enabled for the content type and that the revision checkbox is checked, a revision message will be mandatory. If the user unchecks the revision checkbox, a message will no longer be required.
Comment #2
majorbenks commentedThis is exactly what I need. But Enforce_revlog does not work like that. If I uncheck the revision checkbox, Enforced_revision does still enforce a log message. (The checkbox is not enforced, only the log message is enforced.)
So is my problem actually a bug report?
Comment #3
mdupontI'll have a look.
Comment #4
mdupontFix committed in 7.x-1.x, will be in the -dev snapshot in a few hours. Thanks for the report!
While the AJAX callback triggered when clicking on the revision checkbox was indeed making the revision message appear as not required, the change wasn't really taken into account in the form underlying structure, and was still using the default value. I now try to use the value provided in $form_state (the one that changes during the AJAX callback) before using the default value.
Comment #5
mdupontFixing typo in title.
Comment #6
majorbenks commentedI tested this with rc1, it works fine now. Thanks.