]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/editpage.tmpl
Refactoring continues:
[SourceForge/phpwiki.git] / themes / default / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.11 2002-01-23 19:21:43 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' => $preferences->get('editWidth'),
27                             'onchange' => 'this.form.submit();'));
28
29 $HeightI = HTML::input(array('type' => 'text',
30                              'size' => 3,
31                              'name' => 'pref[editHeight]',
32                              'value' => $preferences->get('editHeight'),
33                              'onchange' => 'this.form.submit();'));
34
35 $AdjustB = $Theme->makeButton(_("Adjust"), "submit:");
36
37 $SignIn = new WikiTemplate('signin');
38 $SignIn->qreplace('FORMNAME', 'editpage');
39
40 $GoodStyleB = $ButtonFactory->makeLinkButton(_("GoodStyle"));
41
42 $s = $Theme->getButtonSeparator();
43 ?>
44
45 <?php if (isset($PREVIEW_CONTENT)) { ?>
46   <p><strong><?=_("Preview only!  Changes not saved.")?></strong></p>
47   <div class="wikitext"><?= $PREVIEW_CONTENT ?></div>
48 <?php } ?>
49
50 <?php if (!$IS_CURRENT) { ?>
51   <p><strong><?=_("Warning: You are editing an old revision.")?>
52         <?=_("Saving this page will overwrite the current version.")?></strong></p>
53   <hr class="ignore" noshade="noshade" />
54 <?php } ?>
55
56 <?php /*
57  * FIXME: Hack! 
58  * The <?=$ACTION?>EditPage URL used for the form action parameter is bogus.
59  * This is needed, otherwise the redirect to the real browser
60  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
61  * a redirect from a page to itself.)
62  *
63  * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it
64  * to wrap long lines.
65  *
66  */ ?>
67
68 <form method="post" action="<?=$ACTION?>EditPage" accept-charset="<?=CHARSET?>" name="editpage">
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="<?=$preferences->get('editHeight')?>"
80           cols="<?=$preferences->get('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     <?= $SignIn ?> 
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>