<?PHP
    // Make sure all variables are defined
if (!isset($form->deleteversions)) {
    $form->deleteversions = 1;
}
if (!isset($form->changesfield)) {
    $form->changesfield = 72;
}

?>
<form action="admin.php" method="post" enctype="multipart/form-data">
<fieldset class="invisiblefieldset">
<input type="hidden" name="userid" value="<?php print $userid; ?>" />
<input type="hidden" name="groupid" value="<?php print $groupid ?>" />
<input type="hidden" name="action" value="<?php print $action; ?>" />
<input type="hidden" name="id" value="<?php print $cm->id ?>" />
<input type="hidden" name="wikipage" value="<?php print $wikipage?>" />

<div class="boxaligncenter">
<?php
if($err->remark) {
  formerr($err->remark);
}
?>
<table cellpadding="5">
<tr valign="top">
    <td align="right"><p><b><?php print_string('authorfieldpattern','wiki') ?>:</b></p></td>
    <td>
        <input type="text" name="authorfieldpattern" size="30" value="<?php p($form->authorfieldpattern) ?>" />
<?php
        helpbutton('revertauthorfieldpattern', get_string('authorfieldpattern', 'wiki'), 'wiki');
        if (!empty($err->authorfieldpattern)) { formerr($err->authorfieldpattern); }
?>
    </td>
</tr>
<tr valign="top">
    <td align="right"><p><b><?php print_string('changesfield','wiki') ?>:</b></p></td>
    <td>
        <input type="text" name="changesfield" size="30" value="<?php p($form->changesfield) ?>" />
        <?php if (!empty($err->changesfield)) { formerr($err->changesfield); } ?>
    </td>
</tr>
<tr valign="top">
    <td align="right"><p><b><?php print_string('howtooperate', 'wiki') ?>:</b></p></td>
    <td>
        <?php
        $operations=array( "lastonly" => get_string("revertlastonly","wiki"),
                           "allsince" => get_string("revertallsince","wiki"),
                           "the" => get_string("revertthe","wiki"));
        choose_from_menu($operations, "howtooperate", $form->howtooperate, "");
        ?>
    </td>
</tr>
<tr valign="top">
    <td align="right"><p><b><?php print_string('deleteversions','wiki') ?>:</b></p></td>
    <td>
        <input type="text" name="deleteversions" size="2" value="<?php p($form->deleteversions) ?>" />
        <?php if (!empty($err->deleteversions)) { formerr($err->deleteversions); } ?>
    </td>
</tr>
</table>
  <input type="submit" name="proceed" value="<?php print get_string("revertchanges","wiki"); ?>" />
</div></fieldset></form>
