blob: fb2a366da6add148a87ca184e82a46776018cab1 [file] [log] [blame]
<!--!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:i18n="http://genshi.edgewall.org/i18n" py:strip="">
<form id="edit" action="${href.wiki(page.name)}" method="post">
<fieldset class="${classes('controlgroup', sidebyside=sidebyside)}">
<input type="hidden" name="from_editor" value="1" />
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="version" value="$page.version" />
<input type="hidden" id="scroll_bar_pos" name="scroll_bar_pos"
value="$scroll_bar_pos" />
<div id="rows">
<py:if test="not sidebyside">
<label for="editrows">Adjust edit area height:
<select id="editrows" class="span1" name="editrows" tabindex="43">
<option py:for="rows in range(8, 42, 4)" value="$rows"
selected="${str(rows) == edit_rows or None}">
$rows
</option>
</select>
</label>
</py:if>
<label for="sidebyside" class="pull-right"
title="Selecting and pressing 'Preview' enters a two-column [edit|preview] mode">
Edit side-by-side
<input type="checkbox" name="sidebyside" id="sidebyside" checked="$sidebyside" />
</label>
<br/>
</div>
<p><textarea id="text" class="wikitext${' trac-resizable' if not sidebyside else None}"
name="text" rows="${max(edit_rows, 10)}" style="width:100%; min-width:50%; max-width:100%">
$page.text</textarea>
</p>
<div id="help-block pull-right" i18n:msg="">
<span class="label label-info">Note</span>
See <a href="${href.wiki('WikiFormatting')}">WikiFormatting</a> and
<a href="${href.wiki('TracWiki')}">TracWiki</a> for help on editing wiki content.
</div>
</fieldset>
<div class="well">
<fieldset id="changeinfo">
<legend>Change information</legend>
<div id="changeinfo1">
<div py:if="authname == 'anonymous'" class="field">
<label>Your email or username:<br />
<input id="author" type="text" class="input-xlarge" name="author" value="$author" />
</label>
<p py:if="author == 'anonymous'" class="hint">
<i18n:msg>E-mail address and user name can be saved in the <a href="${href.prefs()}">Preferences</a>.</i18n:msg>
</p>
</div>
<div class="field">
<label>Comment about this change (optional):<br />
<input id="comment" type="text" class="input-xlarge" name="comment" value="$comment" />
</label>
</div>
</div>
<div py:if="'WIKI_ADMIN' in perm(page.resource)" id="changeinfo2" class="options">
<label><input type="checkbox" name="readonly" id="readonly"
checked="${page.readonly or None}" />
Page is read-only
</label>
</div>
</fieldset>
</div>
<div class="btn-toolbar buttons">
<div class="btn-group" py:choose="action">
<py:when test="'collision'">
<input class="btn" type="submit" name="preview" value="${_('Preview')}" disabled="disabled" />
<input class="btn" type="submit" name="merge" value="${_('Merge changes')}" accesskey="r" />
<input class="btn" type="submit" name="save" value="${_('Submit changes')}" disabled="disabled" />
</py:when>
<py:otherwise>
<input class="btn" type="submit" name="preview" value="${_('Preview Page')}" accesskey="p" />
<input class="btn" type="submit" name="diff" value="${_('Review Changes')}" accesskey="r" />
<input class="btn" type="submit" id="save" name="save" value="${_('Submit changes')}" />
</py:otherwise>
</div>
<div class="btn-group">
<input class="btn-link" type="submit" name="cancel" value="${_('Cancel')}" />
</div>
</div>
</form>
</html>