<?php
/*
 * FIXME: Hack!
 * The funky URL used for the form action parameter is bogus.
 * This is needed, otherwise the redirect to the real browser
 * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
 * a redirect from a page to itself.)
 */
?>
<div class="wikitext" id="editform">
<form method="post" id="editpage" name="editpage"
      action="<?php echo $request->getPostURL() ?>"
      accept-charset="UTF-8">
  <?php if (!empty($_GET['start_debug'])) echo '<input type="hidden" name="start_debug" value="1">'; ?>
<table class="toolbar fullwidth">
<tr class="bottom">
  <td>
    <?php echo $PAGE_LOCKED_MESSAGE ?>
    <?php echo $CONCURRENT_UPDATE_MESSAGE ?>
    <?php if (!$IS_CURRENT) { ?>
      <p class="warning_msg"><strong><?php echo _("Warning: You are editing an old revision.")?>
            <?php echo _("Saving this page will overwrite the current version.")?></strong></p>
    <?php } ?>
  </td>
  <td>
    <?php echo $PREVIEW_B ?>
    <?php if ($SAVE_B) { ?>
      <?php echo $SEP?> <?php echo $SAVE_B ?>
    <?php } ?>
  </td>
</tr>
</table>
<table class="fullwidth">
    <tr><td><?php echo $EDIT_TOOLBAR ?></td>
        <td class="align-right"><div id="editarea-size">
    <?php echo _("Size")._(":") ?>
    <label for="pref-editHeight"><b><?php echo _("H")?></b></label> <?php echo $HEIGHT_PREF?> 
    <label for="pref-editWidth"><b><?php echo _("W")?></b></label> <?php echo $WIDTH_PREF?>
    <noscript><?php echo Button("submit:", _("Adjust"), 'wikiaction')?></noscript>
  </div></td></tr></table>
<a id="editarea"></a><?php echo $EDIT_TEXTAREA?>
<br /><small>
<?php echo _("Summary")._(":") ?><?php echo $SUMMARY_INPUT ?>
<br />
<?php if (ENABLE_CAPTCHA) { ?>
  <?php echo $CAPTCHA_IMAGE ?><br/>
  <?php echo $CAPTCHA_LABEL ?><?php echo $CAPTCHA_INPUT ?><br/>
<?php } ?>
<?php echo fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
<br />
<?php echo $MINOR_EDIT_CB ?>
  <label for="edit-minor_edit">
  <?php echo fmt("I'm just doing minor edits. Please divert the usual logging to %s instead.",
        WikiLink(_("RecentEdits"))) ?></label>
<br />
  <?php if ($user->isAdmin()) { ?> 
    <?php echo $SEP?><?php echo $LOCKED_CB ?> <label for="edit-locked"><?php echo _("Locked")?></label>
   <?php } ?>
</small>
<br />
<?php if (isset($PREVIEW_CONTENT)) { ?>
  <hr />
  <p><strong><?php echo _("Preview only!  Changes not saved.")?></strong></p>
  <?php echo $PREVIEW_CONTENT ?>
  <hr />
<?php } ?>

<div class="wiki-edithelp">
<!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
<p><?php echo fmt("See %s tips for editing.", WikiLink(_("Help")."/"._("GoodStyle"))) ?></p>
<?plugin IncludePage page=_("Help/TextFormattingRules") section=_("Synopsis") quiet=1?>
</div>
<?php echo $HIDDEN_INPUTS?>
</form>
</div>

<hr />
