[pmwiki-users] Minor edit
Mark Trumpold
mark at ruthtrumpold.id.au
Mon Nov 20 13:13:28 CST 2006
Hi Hans
This is exactly want I need. I was wondering if you know how I can clear the
'author' field because the author automatically fills the field.
Thanks Again
Mark
On 20/11/06 7:18 PM, "Hans" <design5 at softflow.co.uk> wrote:
> Monday, November 20, 2006, 3:27:36 PM, Mark wrote:
>
>> Is there a way I can add another button 'Major edit' ext to 'minor edit' and
>> force the editor to click one of the two buttons
>
> You could have radio buttons instead of the minor_edit checkbox.
> You would need to define these in config.php:
>
> $InputTags['e_majorradio'] = array(
> ':html' => "<input type='radio' \$InputFormArgs />",
> 'name' => 'diffclass', 'value' => 'major');
> $InputTags['e_minorradio'] = array(
> ':html' => "<input type='radio' \$InputFormArgs />",
> 'name' => 'diffclass', 'value' => 'minor');
> if (@$_POST['diffclass']=='major')
> $InputTags['e_minorradio']['checked'] = '';
> $InputTags['e_majorradio']['checked'] = 'checked';
> if (@$_POST['diffclass']=='minor')
> $InputTags['e_minorradio']['checked'] = 'checked';
> $InputTags['e_majorradio']['checked'] = '';
>
> and then edit your Site.EditForm or whatever editform you use,
> replacing
> (:input e_minorcheckbox:) $[This is a minor edit]\\
>
> with
> (:input e_minorradio:) $[This is a minor edit]\\
> (:input e_majorradio:) $[This is a major edit]\\
>
> Change the text displayed, put them on the same line or whatever you
> fancy.
>
> I don't know if this is the shortest way to code the radio buttons,
> but it works.
>
>
> Hans
>
More information about the pmwiki-users
mailing list