]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/templates/editpage.tmpl
Combine and refactor editpage.php and savepage.php.
[SourceForge/phpwiki.git] / themes / Portland / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.12 2002-01-30 01:33:20 dairiki Exp $ -->
3 <?php
4
5 $WidthI = HTML::input(array('type' => 'text',
6                             'size' => 3,
7                             'name' => 'pref[editWidth]',
8                             'value' => $request->getPref('editWidth'),
9                             'onchange' => 'this.form.submit();'));
10
11 $HeightI = HTML::input(array('type' => 'text',
12                              'size' => 3,
13                              'name' => 'pref[editHeight]',
14                              'value' => $request->getPref('editHeight'),
15                              'onchange' => 'this.form.submit();'));
16
17 $AdjustB = $Theme->makeButton(_("Adjust"), "submit:");
18
19
20 $GoodStyleB = $Theme->makeLinkButton(_("GoodStyle"));
21
22 $s = $Theme->getButtonSeparator();
23 ?>
24
25 <?php /*
26  * FIXME: Hack! 
27  * The funky URL used for the form action parameter is bogus.
28  * This is needed, otherwise the redirect to the real browser
29  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
30  * a redirect from a page to itself.)
31  *
32  * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it
33  * to wrap long lines.
34  *
35  */ ?>
36
37 <form method="post" name="editpage"
38       action="<?=WikiURL($page,array('action'=>'edit'))?>"
39       accept-charset="<?=CHARSET?>">
40 <table summary="Toolbar: Save, Preview, and edit warnings." class="toolbar" width="100%"
41        cellpadding="0" cellspacing="0" border="0">
42 <tr align="bottom">
43   <td>
44     <?= $PAGE_LOCKED_MESSAGE ?>
45     <?= $CONCURRENT_UPDATE_MESSAGE ?>
46     <?php if (!$IS_CURRENT) { ?>
47       <p><strong><?=_("Warning: You are editing an old revision.")?>
48             <?=_("Saving this page will overwrite the current version.")?></strong></p>
49     <?php } ?>
50   </td>
51   <td align="right">
52     <?= $PREVIEW_B ?>
53     <?php if ($SAVE_B) { ?>
54       <?=$s?> <?= $SAVE_B ?>
55     <?php } ?>
56   </td>
57 </tr>
58 </table>
59 <?=$EDIT_TEXTAREA?>
60 <br />
61 <?=_("Summary:")?> <?= $SUMMARY_INPUT ?>
62 <br />
63 <?= fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
64 <br />
65 <?= $MINOR_EDIT_CB ?>
66 <?= fmt("I'm just doing minor edits. Please divert the usual logging to %s instead.",
67         $Theme->linkExistingWikiWord(_("RecentEdits"))) ?>
68 <br />
69 <p>
70   <?=_("Edit Area Size:")?> <b><?=_("H")?></b>
71   <?=$HeightI?>
72   <b><?=_("W")?></b>
73   <?=$WidthI?>
74   <?=$AdjustB?>
75   <br />
76   <?=$NEW_MARKUP_CB?>  <?=_("Use new markup")?>
77 </p>
78
79 <?php if (isset($PREVIEW_CONTENT)) { ?>
80   <hr />
81   <p><strong><?=_("Preview only!  Changes not saved.")?></strong></p>
82   <div class="wikitext"><?= $PREVIEW_CONTENT ?></div>
83   <hr />
84 <?php } ?>
85 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
86 <p><?= fmt("See %s tips for editing.", $GoodStyleB) ?></p>
87 <div class="wiki-edithelp">
88 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
89 </div>
90 <?=$HIDDEN_INPUTS?>
91 </form>
92 <hr />