source: trunk/templates/edit_form.tt @ 644

Last change on this file since 644 was 617, checked in by Dominic Hargreaves, 17 years ago

New css id maincontent, and misc template bugfixes

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