Ticket #132: edit_form.tt

File edit_form.tt, 5.4 kB (added by cds, 2 years ago)
Line 
1[% INCLUDE header.tt page_title = "Edit $node_name - $site_name" %]
2[% INCLUDE banner.tt %]
3<div id="content">
4[% INCLUDE navbar.tt %]
5<div id="maincontent">
6<h1>Edit <span class="node_name">[% node_name %]</span></h1>
7
8[% IF preview_html AND preview_above_edit_box %]
9  <h2>Preview</h2>
10  [% INCLUDE display_metadata.tt %]
11  [% preview_html %]
12  <br clear="all" />
13[% END %]
14
15<form action="[% cgi_url %]" method="POST" enctype="application/x-www-form-urlencoded" width="100%">
16  <table summary="Form for editing page attributes" width="100%">
17    <tr>
18      <td colspan="2">
19        [%# Put the td outside the TRY-CATCH because TT will print everything
20            up to where it gets the error - avoid mismatched tags. %]
21        [% TRY %]
22          [% INCLUDE custom_licence.tt %]
23        [% CATCH %]
24        [% END %]
25      </td>
26    </tr>
27    <tr>
28      <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
29      <td align="center"><input type="submit" name="Save" value="Save changes" class="form_button" /></td>
30    </tr>
31    <tr>
32      <td colspan="2" align="center"><a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a></td>
33    </tr>
34    <tr>
35      <td colspan="2">
36        <fieldset>
37          <legend>Main information (required)</legend>
38          <table summary="Fields containing the node's main content and its category and locale listings">
39            <tr>
40              <td class="label"><label for="content">Content:</label></td>
41              <td><textarea name="content" id="content" rows="21" cols="70" wrap="virtual">[% content %]</textarea></td>
42            </tr>
43            <tr>
44              <td class="label"><label for="locales">Locales:<br />(one per line)</label></td>
45[%# NOTE: The whitespace in the next two textareas is deliberate, to avoid
46  getting bogus tabs and blank lines in the textarea content.  Please
47  do not reintroduce this bug.  Test on more than one browser. #%]
48              <td><textarea name="locales" id="locales" rows="5" cols="70">[% FOREACH locale = locales %][% locale.name %]
49[% END %]</textarea></td>
50            </tr>
51            <tr>
52              <td class="label"><label for="categories">Categories:<br />(one per line)</label></td>
53              <td><textarea name="categories" id="categories" rows="5" cols="70">[% FOREACH category = categories %][% category.name %]
54[% END %]</textarea></td>
55            </tr>
56          </table>
57        </fieldset>
58        &nbsp;
59        <fieldset>
60          <legend>Metadata (optional)</legend>
61          <table summary="Form for entering metadata about the subject of this node">
62            <tr>
63              <td class="label"><label for="phone">Phone:</label></td>
64              <td><input type="text" size="50" id="phone" name="phone" value="[% phone %]" /></td>
65            </tr>
66            <tr>
67              <td class="label"><label for="fax">Fax:</label></td>
68              <td><input type="text" size="50" id="fax" name="fax" value="[% fax %]" /></td>
69            </tr>
70            <tr>
71              <td class="label"><label for="website">Website:</label></td>
72              <td><input type="text" size="50" id="website" name="website" value="[% website %]" /></td>
73            </tr>
74            <tr>
75              <td class="label"><label for="hours">Opening hours:</label></td>
76              <td><input type="text" size="50" id="hours" name="hours_text" value="[% hours_text %]" /></td>
77            </tr>
78            <tr>
79              <td class="label"><label for="address">Address:</label></td>
80              <td><input type="text" size="50" id="address" name="address" value="[% address %]" /></td>
81            </tr>
82            <tr>
83              <td class="label"><label for="postcode">Postcode:</label></td>
84              <td><input type="text" size="50" id="postcode" name="postcode" value="[% postcode %]" /></td>
85            </tr>
86            <tr>
87              <td class="label"><label for="[% coord_field_1 %]">[% coord_field_1_name %]:</label></td>
88              <td><input type="text" size="50" id="[% coord_field_1 %]" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" /></td>
89            </tr>
90            <tr>
91              <td class="label"><label for="[% coord_field_2 %]">[% coord_field_2_name %]:</label></td>
92              <td><input type="text" size="50" id="[% coord_field_2 %]" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" /></td>
93            </tr>
94            <tr>
95              <td class="label"><label for="map_link">Map link:</label></td>
96              <td><input type="text" size="70" id="map_link" name="map_link" value="[% map_link %]" /></td>
97            </tr>
98          </table>
99        </fieldset>
100        &nbsp;
101        [% INCLUDE openguides_information_boxes.tt %]
102      </td>
103    </tr>
104    <tr>
105      <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
106      <td align="center"><input type="submit" name="Save" value="Save changes" class="form_button" /></td>
107    </tr>
108    <tr>
109      <td colspan="2" align="center">
110        <a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a>
111      </td>
112    </tr>
113  </table>
114  <input type="hidden" name="title" value="[% node_name %]" />
115  <input type="hidden" name="checksum" value="[% checksum %]" />
116</form>
117
118[% IF preview_html AND NOT preview_above_edit_box %]
119  <h2>Preview</h2>
120  [% INCLUDE display_metadata.tt %]
121  [% preview_html %]
122  <br clear="all" />
123[% END %]
124
125</div>
126[% INCLUDE footer.tt %]