]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/editpage.tmpl
Trial run of "See GoodStyle tips for editing" inside <div class="wiki-edithelp">...
[SourceForge/phpwiki.git] / themes / default / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.14 2002-01-26 08:18:28 carstenklapp 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 $WidthI = HTML::input(array('type' => 'text',
24                             'size' => 3,
25                             'name' => 'pref[editWidth]',
26                             'value' => $request->getPref('editWidth'),
27                             'onchange' => 'this.form.submit();'));
28
29 $HeightI = HTML::input(array('type' => 'text',
30                              'size' => 3,
31                              'name' => 'pref[editHeight]',
32                              'value' => $request->getPref('editHeight'),
33                              'onchange' => 'this.form.submit();'));
34
35 $AdjustB = $Theme->makeButton(_("Adjust"), "submit:");
36
37
38 $GoodStyleB = $ButtonFactory->makeLinkButton(_("GoodStyle"));
39
40
41 $Markup['old'] = new HtmlElement('option', array('value' => 'old'),
42                                 _("Old"));
43 $Markup['new'] = new HtmlElement('option', array('value' => 'new'),
44                                  _("New"));
45 $selected = $FORMVARS['markup'] == 'new' ? 'new' : 'old';
46 $Markup[$selected]->setAttr('selected', true);
47 $MarkupSelect = new HtmlElement('select', array('name' => 'markup'),
48                                 $Markup);
49
50 $s = $Theme->getButtonSeparator();
51 ?>
52
53 <?php if (isset($PREVIEW_CONTENT)) { ?>
54   <p><strong><?=_("Preview only!  Changes not saved.")?></strong></p>
55   <div class="wikitext"><?= $PREVIEW_CONTENT ?></div>
56 <?php } ?>
57
58 <?php if (!$revision->isCurrent()) { ?>
59   <p><strong><?=_("Warning: You are editing an old revision.")?>
60         <?=_("Saving this page will overwrite the current version.")?></strong></p>
61   <hr class="ignore" noshade="noshade" />
62 <?php } ?>
63
64 <?php /*
65  * FIXME: Hack! 
66  * The funky URL used for the form action parameter is bogus.
67  * This is needed, otherwise the redirect to the real browser
68  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
69  * a redirect from a page to itself.)
70  *
71  * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it
72  * to wrap long lines.
73  *
74  */ ?>
75
76 <form method="post" name="editpage"
77       action="<?=WikiURL($page,array('action'=>'edit'))?>"
78       accept-charset="<?=CHARSET?>">
79   <!-- FIXME: fix layout, move CSS to CSS -->
80   <div style="text-align: right; vertical-align: top;">
81     <small><?=_("Edit Area Size:")?> <b><?=_("H")?></b></small>
82     <?=$HeightI?>
83     <small><b><?=_("W")?></b></small>
84     <?=$WidthI?>
85     <noscript><?=$AdjustB?></noscript>
86   </div>
87 <textarea class="wikiedit"
88           name="content"
89           rows="<?=$request->getPref('editHeight')?>"
90           cols="<?=$request->getPref('editWidth')?>"
91           wrap="virtual"><?=$FORMVARS['content']?></textarea>
92
93 <!-- FIXME: fix layout, move CSS to CSS -->
94 <div class="toolbar" style="text-align: center;">
95   <?=_("Summary:")?> <?= $SummaryInput ?>
96 </div>
97 <table summary="Toolbar: Page editing options." class="toolbar" width="100%"
98        cellpadding="0" cellspacing="0" border="0">
99 <tr valign="baseline">
100   <td>Markup Style: <?=$MarkupSelect?></td>
101   <td> 
102     <?= $MinorEditCb ?> <?=_("This is a minor change.")?>
103   </td>
104   <td align="center">
105     <?= $PreviewB ?>
106     <?=$s?><?= $SaveB ?>
107   </td>
108   <td align="right">
109     <?= $user->isSignedIn()
110         ? ''
111         : fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
112     <?= Template('signin', array('FORMNAME' => 'editpage')) ?>
113   </td>
114 </tr>
115 </table>
116
117 <hr noshade="noshade" />
118
119 <div class="wiki-edithelp">
120 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
121 <p><?= fmt("See %s tips for editing.", $GoodStyleB) ?></p>
122 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
123 </div>
124
125 <input type="hidden" name="action" value="save" />
126 <input type="hidden" name="pagename" value="<?=$FORMVARS['pagename']?>" />
127 <input type="hidden" name="editversion" value="<?=$FORMVARS['editversion']?>" />
128 <input type="hidden" name="version" value="<?=$FORMVARS['version']?>" />
129 </form>