]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/templates/editpage.tmpl
Finish conversion to new OO HTML generation scheme.
[SourceForge/phpwiki.git] / themes / Portland / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.5 2002-01-22 03:17:47 dairiki Exp $ -->
3 <?php
4 $SummaryInput = HTML::input(array('type' => 'text',
5                                   'class' => 'wikitext',
6                                   'name' => 'summary',
7                                   'size' => 50,
8                                   'value' => $FORMVARS['summary']));
9
10 $MinorEditCb = HTML::input(array('type' => 'checkbox',
11                                  'name' => 'minor_edit',
12                                  'checked' => (bool) $FORMVARS['minor_edit']));
13
14 $PreviewB = HTML::input(array('type' => 'submit',
15                               'class' => 'button',
16                               'name' => 'preview',
17                               'value' => _("Preview")));
18 $SaveB = HTML::input(array('type' => 'submit',
19                            'class' => 'button',
20                            'name' => 'save',
21                            'value' => _("Save")));
22
23
24   $SignIn = new WikiTemplate('signin');
25   $SignIn->qreplace('FORMNAME', 'editpage');
26
27   $s = $Theme->getButtonSeparator();
28 ?>
29
30 <?php /*
31  * FIXME: Hack! 
32  * The <?=$ACTION?>EditPage URL used for the form action parameter is bogus.
33  * This is needed, otherwise the redirect to the real browser
34  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
35  * a redirect from a page to itself.)
36  *
37  * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it
38  * to wrap long lines.
39  *
40  */ ?>
41
42 <form method="post" action="<?=$ACTION?>EditPage" accept-charset="<?=CHARSET?>" name="editpage">
43 <table summary="Toolbar: Save, Preview, and edit warnings." class="toolbar" width="100%"
44        cellpadding="0" cellspacing="0" border="0"><tr align="baseline">
45   <td>
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     <?php if (isset($PREVIEW_CONTENT)) { ?>
51       <p><strong><?=_("Preview only!  Changes not saved.")?></strong></p>
52     <?php } ?>
53   </td>
54   <td align="right"><?= $PreviewB ?><?=$s?><?= $SaveB ?></td></tr>
55   <?php if (isset($PREVIEW_CONTENT)) { ?>
56     <tr><td colspan="2">
57       <hr />
58       <div class="wikitext"><?= $PREVIEW_CONTENT ?></div>
59     </td></tr>
60   <?php } ?>
61 </table>
62 <textarea class="wikiedit"
63           name="content"
64           rows="<?=$EDIT_AREA_HEIGHT?>"
65           cols="<?=$EDIT_AREA_WIDTH?>"
66           wrap="virtual"><?=$FORMVARS['content']?></textarea>
67   <br />
68   <?=_("Summary:")?> <?= $SummaryInput ?>
69   <br />
70   <?= fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
71   <br />
72   <?= $MinorEditCb ?>
73   <?= fmt("I'm just doing minor edits. Please divert the usual logging to %s instead.",
74           LinkExistingWikiWord(_("RecentEdits"))) ?>
75   <br /><br />
76 <div name="#edit-tips"><?php
77   // FIXME: convert this to use the IncludePage plugin. ?>
78 <?= fmt("See %s tips for editing.",
79         LinkExistingWikiWord(_("GoodStyle"))) ?>
80 <br />
81 <?= fmt("You can change the size of the editing area in %s.",
82         LinkExistingWikiWord(_("UserPreferences"))) ?>
83 </div>
84
85 <div class="wiki-edithelp">
86 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
87 </div>
88 <input type="hidden" name="action" value="save" />
89 <input type="hidden" name="pagename" value="<?=$FORMVARS['pagename']?>" />
90 <input type="hidden" name="editversion" value="<?=$FORMVARS['editversion']?>" />
91 <input type="hidden" name="version" value="<?=$FORMVARS['version']?>" />
92 </form>
93 <hr />