[pmwiki-users] Any suggestions?
Patrick R. Michaud
pmichaud at pobox.com
Sun Sep 17 14:15:59 CDT 2006
On Sun, Sep 17, 2006 at 08:08:09PM +1200, Allister Jenks wrote:
> Here's my problem.
>
> A live site, so when editing a page with complex markup, I save as
> draft. I make several iterations to test the changes and soon enough,
> in a moment of frustration that my logic isn't doing what I want,
> instinct kicks in and I click 'Save' instead of 'Save draft'!
>
> Could the buttons be reversed or could there be an 'are you sure' if
> clicking 'Save' on a -Draft page?
(Side note: There's a discussion about changing the buttons for
drafts at http://www.pmwiki.org/wiki/PITS/00755 .)
Yes, the buttons can be reversed -- just edit the Site.EditForm
page on your site and swap the order of the buttons.
There can also be an 'are you sure' box -- just add the markup:
(:input checkbox name='confirm':) Confirm save
into Site.EditForm, and then in local/config.php do:
if ($action == 'edit' && @$_POST['post'] && !@$_POST['confirm']) {
$MessagesFmt[] = "Save requires confirmation";
$EnablePost = 0;
}
This will require the 'confirm' checkbox to be checked before
allowing a post.
Pm
More information about the pmwiki-users
mailing list