[% INCLUDE header.tt page_title = "Edit $node_name - $site_name" %]
<div id="content">
<h1 align="center">Edit "[% node_name %]"</h1>
[% IF preview_html AND preview_above_edit_box %]
<h2>Preview</h2>
[% INCLUDE display_metadata.tt %]
[% preview_html %]
<br clear="all" />
[% END %]
<form action="[% cgi_url %]" method="POST" enctype="application/x-www-form-urlencoded">
<table summary="Form for editing page attributes">
<tr>
<td colspan="2">
[%# Put the td outside the TRY-CATCH because TT will print everything
up to where it gets the error - avoid mismatched tags. %]
[% TRY %]
[% INCLUDE custom_licence.tt %]
[% CATCH %]
[% END %]
</td>
</tr>
<tr>
<td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
<td align="center"><input type="submit" name="Save" value="Save changes" class="form_button" /></td>
</tr>
<tr>
<td colspan="2" align="center"><a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a></td>
</tr>
<tr>
<td colspan="2">
<fieldset>
<legend>Main information (required)</legend>
<table summary="Fields containing the node's main content and its category and locale listings">
<tr>
<td class="label"><label for="content">Content:</label></td>
<td><textarea name="content" id="content" rows="21" cols="70" wrap="virtual">[% content %]</textarea></td>
</tr>
<tr>
<td class="label"><label for="locales">Locales:<br />(one per line)</label></td>
[%# NOTE: The whitespace in the next two textareas is deliberate, to avoid
getting bogus tabs and blank lines in the textarea content. Please
do not reintroduce this bug. Test on more than one browser. #%]
<td><textarea name="locales" id="locales" rows="5" cols="70">[% FOREACH locale = locales %][% locale.name %]
[% END %]</textarea></td>
</tr>
<tr>
<td class="label"><label for="categories">Categories:<br />(one per line)</label></td>
<td><textarea name="categories" id="categories" rows="5" cols="70">[% FOREACH category = categories %][% category.name %]
[% END %]</textarea></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Metadata (optional)</legend>
<table summary="Form for entering metadata about the subject of this node">
<tr>
<td class="label"><label for="phone">Phone:</label></td>
<td><input type="text" size="50" id="phone" name="phone" value="[% phone %]" /></td>
</tr>
<tr>
<td class="label"><label for="fax">Fax:</label></td>
<td><input type="text" size="50" id="fax" name="fax" value="[% fax %]" /></td>
</tr>
<tr>
<td class="label"><label for="website">Website:</label></td>
<td><input type="text" size="50" id="website" name="website" value="[% website %]" /></td>
</tr>
<tr>
<td class="label"><label for="hours">Opening hours:</label></td>
<td><input type="text" size="50" id="hours" name="hours_text" value="[% hours_text %]" /></td>
</tr>
<tr>
<td class="label"><label for="address">Address:</label></td>
<td><input type="text" size="50" id="address" name="address" value="[% address %]" /></td>
</tr>
<tr>
<td class="label"><label for="postcode">Postcode:</label></td>
<td><input type="text" size="50" id="postcode" name="postcode" value="[% postcode %]" /></td>
</tr>
<tr>
<td class="label"><label for="[% coord_field_1 %]">[% coord_field_1_name %]:</label></td>
<td><input type="text" size="50" id="[% coord_field_1 %]" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" /></td>
</tr>
<tr>
<td class="label"><label for="[% coord_field_2 %]">[% coord_field_2_name %]:</label></td>
<td><input type="text" size="50" id="[% coord_field_2 %]" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" /></td>
</tr>
<tr>
<td class="label"><label for="map_link">Map link:</label></td>
<td><input type="text" size="70" id="map_link" name="map_link" value="[% map_link %]" /></td>
</tr>
</table>
</fieldset>
[% INCLUDE openguides_information_boxes.tt %]
</td>
</tr>
<tr>
<td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
<td align="center"><input type="submit" name="Save" value="Save changes" class="form_button" /></td>
</tr>
<tr>
<td colspan="2" align="center">
<a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a>
</td>
</tr>
</table>
<input type="hidden" name="title" value="[% node_name %]" />
<input type="hidden" name="checksum" value="[% checksum %]" />
</form>
[% IF preview_html AND NOT preview_above_edit_box %]
<h2>Preview</h2>
[% INCLUDE display_metadata.tt %]
[% preview_html %]
<br clear="all" />
[% END %]
[% INCLUDE footer.tt %]