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