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)
information.

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:

 if(@$_REQUEST['previewchanges']>'')
   include_once("$FarmD/cookbook/previewchanges.php");


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
   include_once("$FarmD/cookbook/previewchanges.php");


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).

 http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_type_reset

Petko


_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to