[pmwiki-users] PreviewChanges: Show only on demand?
list_ob at gmx.net
Tue Feb 11 02:18:51 CST 2014
Petko Yotov wrote:
>You can add a checkbox to Site.EditForm like this:
> (:input checkbox previewchanges:) Preview changes
>Then in config.php, use:
since it takes two clicks to get the diff each time (the checkbox
state isn't preserved), I decided to use the button version.
>To have a new button instead of a checkbox, in Site.EditForm:
> (:input submit preview "Show changes":)
>Then in config.php:
> if(@$_REQUEST['preview']=='Show changes') # same label as the button
Looking at forms.php (and not 100% understanding), I just was not sure
whether there are side effects.
>> BTW: forms.php contains code for "e_resetbutton", does anybody know
>> what it is good for?
>If a "reset" button is pressed, all form fields are reset to their default
>content (before any changes).
Thanks, I should have looked at forms.php before asking.
Oliver Betz, Munich http://oliverbetz.de/
More information about the pmwiki-users