[pmwiki-users] PreviewChanges: Show only on demand?
5ko at 5ko.fr
Mon Feb 10 17:40:55 CST 2014
Oliver Betz writes:
> http://www.pmwiki.org/wiki/Cookbook/PreviewChanges is very useful to
> see the changes during complex edits.
> But I'm afraid that novice users can be confused by this (seldom used)
> And with a large number of diffs, the preview is shifted down so you
> have to scroll more.
> Therefore I consider either a checkbox or a new button "show diff" in
> the edit form.
You can add a checkbox to Site.EditForm like this:
(:input checkbox previewchanges:) Preview changes
Then in config.php, use:
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
> 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).
More information about the pmwiki-users