]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/templates/editpage.tmpl
sync with changes in default/templates (use new markup checkbox)
[SourceForge/phpwiki.git] / themes / Portland / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.11 2002-01-28 01:15:56 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 = $Theme->makeLinkButton(_("GoodStyle"));
39
40
41 $NewMarkupCB = HTML::input(array('name' => 'markup',
42                                  'value' => 'new',
43                                  'type' => 'checkbox',
44                                  'checked' => $FORMVARS['markup'] == 'new'));
45
46 $s = $Theme->getButtonSeparator();
47 ?>
48
49 <?php /*
50  * FIXME: Hack! 
51  * The funky URL used for the form action parameter is bogus.
52  * This is needed, otherwise the redirect to the real browser
53  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
54  * a redirect from a page to itself.)
55  *
56  * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it
57  * to wrap long lines.
58  *
59  */ ?>
60
61 <form method="post" name="editpage"
62       action="<?=WikiURL($page,array('action'=>'edit'))?>"
63       accept-charset="<?=CHARSET?>">
64 <table summary="Toolbar: Save, Preview, and edit warnings." class="toolbar" width="100%"
65        cellpadding="0" cellspacing="0" border="0"><tr align="baseline">
66   <td>
67     <?php if (!$revision->isCurrent()) { ?>
68       <p><strong><?=_("Warning: You are editing an old revision.")?>
69             <?=_("Saving this page will overwrite the current version.")?></strong></p>
70     <?php } ?>
71     <?php if (isset($PREVIEW_CONTENT)) { ?>
72       <p><strong><?=_("Preview only!  Changes not saved.")?></strong></p>
73     <?php } ?>
74   </td>
75   <td align="right"><?= $PreviewB ?><?=$s?><?= $SaveB ?></td></tr>
76   <?php if (isset($PREVIEW_CONTENT)) { ?>
77     <tr><td colspan="2">
78       <hr />
79       <div class="wikitext"><?= $PREVIEW_CONTENT ?></div>
80     </td></tr>
81   <?php } ?>
82 </table>
83 <textarea class="wikiedit"
84           name="content"
85           rows="<?=$request->getPref('editHeight')?>"
86           cols="<?=$request->getPref('editWidth')?>"
87           wrap="virtual"><?=$FORMVARS['content']?></textarea>
88 <br />
89 <?=_("Summary:")?> <?= $SummaryInput ?>
90 <br />
91 <?= fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
92 <br />
93 <?= $MinorEditCb ?>
94 <?= fmt("I'm just doing minor edits. Please divert the usual logging to %s instead.",
95         $Theme->linkExistingWikiWord(_("RecentEdits"))) ?>
96 <br />
97 <p>
98   <?=_("Edit Area Size:")?> <b><?=_("H")?></b>
99   <?=$HeightI?>
100   <b><?=_("W")?></b>
101   <?=$WidthI?>
102   <?=$AdjustB?>
103   <br />
104   <?=$NewMarkupCB?>  <?=_("Use new markup")?>
105 </p>
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 <div class="wiki-edithelp">
109 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
110 </div>
111 <input type="hidden" name="action" value="save" />
112 <input type="hidden" name="pagename" value="<?=$FORMVARS['pagename']?>" />
113 <input type="hidden" name="editversion" value="<?=$FORMVARS['editversion']?>" />
114 <input type="hidden" name="version" value="<?=$FORMVARS['version']?>" />
115 </form>
116 <hr />