]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/editpage.tmpl
Fix form POST action URLS.
[SourceForge/phpwiki.git] / themes / default / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.37 2003-02-17 06:08:25 dairiki Exp $ -->
3 <?php
4 $WidthI = HTML::input(array('type' => 'text',
5                             'size' => 3,
6                             'maxlength' => 4,
7                             'class' => "numeric",
8                             'name' => 'pref[editWidth]',
9                             'value' => $request->getPref('editWidth'),
10                             'onchange' => 'this.form.submit();'));
11
12 $HeightI = HTML::input(array('type' => 'text',
13                              'size' => 3,
14                              'maxlength' => 4,
15                              'class' => "numeric",
16                              'name' => 'pref[editHeight]',
17                              'value' => $request->getPref('editHeight'),
18                              'onchange' => 'this.form.submit();'));
19
20
21 $s = $Theme->getButtonSeparator();
22 ?>
23
24 <?php if (isset($PREVIEW_CONTENT)) { ?>
25   <p><strong><?=_("Preview only!  Changes not saved.")?></strong>
26 <!-- FIXME: it would be nice to put a link to the #editarea anchor below,
27      but it does not work currently with the <base> declared in top.tmpl.
28      I think we need to do away with using <base> altogether... -->
29      <?= fmt("Please continue editing.  (You'll find your %s at the bottom of the page.)",
30           /* HTML::a(array("href" => "#editarea"), */ _("edit area") /*)  */) ?>
31   </p>
32   <hr class="printer" noshade="noshade" />
33   <?= $PREVIEW_CONTENT ?>
34   <hr class="printer" noshade="noshade" />
35 <?php } ?>
36
37 <?= $PAGE_LOCKED_MESSAGE ?>
38 <?= $CONCURRENT_UPDATE_MESSAGE ?>
39
40 <?php if (! $IS_CURRENT) { ?>
41   <p><strong><?=_("Warning: You are editing an old revision.")?>
42         <?=_("Saving this page will overwrite the current version.")?></strong></p>
43 <?php } ?>
44 <?php /*
45  * FIXME: Hack! 
46  * The funky URL used for the form action parameter is bogus.
47  * This is needed, otherwise the redirect to the real browser
48  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
49  * a redirect from a page to itself.)
50  *
51  * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it
52  * to wrap long lines.
53  *
54  */ ?>
55
56 <form method="post" name="editpage"
57       action="<?= $request->getPostURL() ?>"
58       accept-charset="<?=CHARSET?>">
59   <?php /* To clear beyond a larger logo, such as in the Hawaiian theme */ ?>
60   <br clear="both" />
61   <div id="editarea-size">
62     <?=_("Edit Area Size:")?>
63     <b><?=_("H")?></b> <?=$HeightI?>
64     <b><?=_("W")?></b> <?=$WidthI?>
65     <noscript><?=Button("submit:", _("Adjust"), 'wikiaction')?></noscript>
66   </div>
67   <a name="editarea" id="editarea"><?=$EDIT_TEXTAREA?></a>
68
69 <!-- FIXME: fix layout, move CSS to CSS -->
70 <div class="toolbar" style="text-align: center;">
71   <?=_("Summary:")?> <?=$SUMMARY_INPUT?>
72 </div>
73 <table summary="Toolbar: Page editing options." class="toolbar" width="100%"
74        cellpadding="0" cellspacing="0" border="0">
75 <tr valign="middle">
76   <td> 
77     <?=$MINOR_EDIT_CB ?> <?=_("This is a minor change.")?><br />
78     <?=$OLD_MARKUP_CB?>  <?=_("Use old markup")?>
79   </td>
80   <td align="center">
81     <?= $PREVIEW_B ?>
82     <?php if ($SAVE_B)  { ?> 
83       <?=$s?><?= $SAVE_B ?>
84     <?php } ?>
85   </td>
86   <td align="right">
87     <?= $user->isSignedIn()
88         ? ''
89         : fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
90     <?= Template('signin', array('FORMNAME' => 'editpage')) ?>
91   </td>
92 </tr>
93 <?php if ($user->isadmin()) { ?>
94   <tr>
95     <td><?= $LOCKED_CB ?> <?=_("Locked")?></td>
96   </tr>
97 <?php } ?>
98 </table>
99
100 <hr noshade="noshade" />
101
102 <script language="JavaScript1.3" type="text/javascript">
103 <!--
104 function showOldMarkupRules(show) {
105   if (document.getElementById) {
106     if (!show) {
107       document.getElementById('newMarkup').style.display="block";
108       document.getElementById('oldMarkup').style.display="none";
109     } else {
110       document.getElementById('newMarkup').style.display="none";
111       document.getElementById('oldMarkup').style.display="block";
112     }
113   }
114 }
115 // -->
116 </script>
117
118 <div id="oldMarkup" class="wiki-edithelp">
119 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
120 <p><?= fmt("See %s tips for editing.", WikiLink(_("GoodStyle"))) ?></p>
121 <?plugin IncludePage page=_("OldTextFormattingRules") section=_("Synopsis") quiet=1?>
122 </div>
123 <div id="newMarkup" class="wiki-edithelp">
124 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
125 <p><?= fmt("See %s tips for editing.", WikiLink(_("GoodStyle"))) ?></p>
126 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
127 </div>
128 <?=$HIDDEN_INPUTS?>
129 </form>
130
131 <script language="JavaScript1.3" type="text/javascript">
132 <!--
133 if (document.getElementById) {
134   showOldMarkupRules(document.getElementById('useOldMarkup').checked);
135 }
136 // -->
137 </script>