Is it possible require the field What did you change?
The user only can save a page if input some information.
I tried used this code:
jQuery(function(){ var saveEnabledTitle = 'Save your page ( Type \'Ctrl+S\' )' var previewEnabledTitle = 'Preview ( Type \'Ctrl+Shift+E\' )' var saveDisabledTitle = 'Please enter a change comment before saving'; var previewDisabledTitle = 'Please enter a change comment before previewing'; // confluence UI limitation var saveButtonCheck = function() { var commentField = jQuery('#rte-savebar #versionComment'); if (commentField.length == 0 || !$(commentField).is(':visible')) return; if (commentField.val().length > 0) { jQuery('#rte-savebar #rte-button-publish') .enable() .attr('title', saveEnabledTitle); jQuery('#rte-savebar #rte-button-preview') .enable() .attr('title', previewEnabledTitle); } else { jQuery('#rte-savebar #rte-button-publish') .disable() .attr('title', saveDisabledTitle); // note: have to disable preview too, since it doesn't work if the publish button is disabled. Probably a workaround but pretty complex. jQuery('#rte-savebar #rte-button-preview') .disable() .attr('title', previewDisabledTitle); } } saveButtonCheck(); jQuery('#rte-savebar #versionComment').keyup(saveButtonCheck); $('.aui-buttons.toolbar-group-preview, .save-button-container').click(function() { $('#versionComment').focus(); })});
Its working perfectly, but to execute is necessary open the page and refresh it.
Could be default when edit any page...
Any susgestion ?
Community moderators have prevented the ability to post new answers.
We are using Confluence 5.8.5 local instance and I can't get this to work. Can you be more clear where you're putting your script? Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.