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