2 <!-- $Id: editpage.tmpl,v 1.14 2002-01-26 08:18:28 carstenklapp Exp $ -->
4 $SummaryInput = HTML::input(array('type' => 'text',
8 'value' => $FORMVARS['summary']));
10 $MinorEditCb = HTML::input(array('type' => 'checkbox',
11 'name' => 'minor_edit',
12 'checked' => (bool) $FORMVARS['minor_edit']));
14 $PreviewB = HTML::input(array('type' => 'submit',
17 'value' => _("Preview")));
18 $SaveB = HTML::input(array('type' => 'submit',
21 'value' => _("Save")));
23 $WidthI = HTML::input(array('type' => 'text',
25 'name' => 'pref[editWidth]',
26 'value' => $request->getPref('editWidth'),
27 'onchange' => 'this.form.submit();'));
29 $HeightI = HTML::input(array('type' => 'text',
31 'name' => 'pref[editHeight]',
32 'value' => $request->getPref('editHeight'),
33 'onchange' => 'this.form.submit();'));
35 $AdjustB = $Theme->makeButton(_("Adjust"), "submit:");
38 $GoodStyleB = $ButtonFactory->makeLinkButton(_("GoodStyle"));
41 $Markup['old'] = new HtmlElement('option', array('value' => 'old'),
43 $Markup['new'] = new HtmlElement('option', array('value' => 'new'),
45 $selected = $FORMVARS['markup'] == 'new' ? 'new' : 'old';
46 $Markup[$selected]->setAttr('selected', true);
47 $MarkupSelect = new HtmlElement('select', array('name' => 'markup'),
50 $s = $Theme->getButtonSeparator();
53 <?php if (isset($PREVIEW_CONTENT)) { ?>
54 <p><strong><?=_("Preview only! Changes not saved.")?></strong></p>
55 <div class="wikitext"><?= $PREVIEW_CONTENT ?></div>
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" />
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.)
71 * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it
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>
83 <small><b><?=_("W")?></b></small>
85 <noscript><?=$AdjustB?></noscript>
87 <textarea class="wikiedit"
89 rows="<?=$request->getPref('editHeight')?>"
90 cols="<?=$request->getPref('editWidth')?>"
91 wrap="virtual"><?=$FORMVARS['content']?></textarea>
93 <!-- FIXME: fix layout, move CSS to CSS -->
94 <div class="toolbar" style="text-align: center;">
95 <?=_("Summary:")?> <?= $SummaryInput ?>
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>
102 <?= $MinorEditCb ?> <?=_("This is a minor change.")?>
109 <?= $user->isSignedIn()
111 : fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
112 <?= Template('signin', array('FORMNAME' => 'editpage')) ?>
117 <hr noshade="noshade" />
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?>
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']?>" />