root/tags/rel0_59/templates/edit_form.tt

Revision 937, 7.8 kB (checked in by kake, 22 months ago)

Let people add name of copyright holder, licence URL, and info page URL for node images (ticket #179).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1[% USE CGI %]
2[% INCLUDE header.tt page_title = "Edit $node_name - $site_name" %]
3<div id="content">
4
5<div id="maincontent">
6<h1 align="center">Edit &quot;[% node_name %]&quot;</h1>
7
8[% IF conflict %]
9  <div class="warning_text">
10    Someone has committed changes to this node since you began editing.
11    You will need to manually merge your changes into the new version.
12  </div>
13[% END %]
14
15[% IF preview_html AND preview_above_edit_box %]
16  <h2>Preview</h2>
17  [% IF summary %]
18    <div id="summary">[% summary %]</div>
19  [% END %]
20  [% INCLUDE display_metadata.tt %]
21  [% preview_html %]
22  <br clear="all" />
23[% END %]
24
25<form action="[% cgi_url %]" method="POST" enctype="application/x-www-form-urlencoded">
26  <table summary="Form for editing page attributes">
27    <tr>
28      <td colspan="[% IF conflict %]3[% ELSE %]2[% END %]">
29        [%# Put the td outside the TRY-CATCH because TT will print everything
30            up to where it gets the error - avoid mismatched tags. %]
31        [% TRY %]
32          [% INCLUDE custom_licence.tt %]
33        [% CATCH %]
34        [% END %]
35        [% IF moderate %]
36        <p>Please note that this node is moderated so your changes will not
37        appear immediately. Please be patient.</p>
38        [% END %]
39      </td>
40    </tr>
41    <tr>
42      <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
43      <td align="center">
44      [% IF moderate %]
45      <input type="submit" name="Save" value="Save changes for moderation" class="form_button" />
46      [% ELSE %]
47      <input type="submit" name="Save" value="Save changes" class="form_button" />
48      [% END %]
49      </td>
50    </tr>
51    <tr>
52      <td colspan="[% IF conflict %]3[% ELSE %]2[% END %]" align="center"><a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a></td>
53    </tr>
54    <tr>
55      <td colspan="[% IF conflict %]3[% ELSE %]2[% END %]">
56        <fieldset>
57          <legend>Main information (required)</legend>
58          <table summary="Fields containing the node's main content and its category and locale listings">
59            <tr>
60              <td class="label"><label for="content">Content:</label></td>
61              <td><textarea name="content" id="content_textarea" rows="21" cols="70" wrap="virtual">[% content %]</textarea></td>
62              [% IF conflict %]
63                <td><small>[% CGI.escapeHTML(new_content) %]</small></td>
64              [% END %]
65            </tr>
66            <tr>
67              <td class="label"><label for="locales">Locales:<br />(one per line)</label></td>
68[%# NOTE: The whitespace in the next two textareas is deliberate, to avoid
69  getting bogus tabs and blank lines in the textarea content.  Please
70  do not reintroduce this bug.  Test on more than one browser. #%]
71              <td><textarea name="locales" id="locales" rows="5" cols="70">[% FOREACH locale = locales %][% locale.name %]
72[% END %]</textarea></td>
73              [% IF conflict %]
74                <td>[% FOREACH locale = new_locales %][% CGI.escapeHTML(locale) %]<br/>[% END %]</td>
75              [% END %]
76            </tr>
77            <tr>
78              <td class="label"><label for="categories">Categories:<br />(one per line)</label></td>
79              <td><textarea name="categories" id="categories" rows="5" cols="70">[% FOREACH category = categories %][% category.name %]
80[% END %]</textarea></td>
81              [% IF conflict %]
82                <td>[% FOREACH category = new_categories %][% CGI.escapeHTML(category) %]<br/>[% END %]</td>
83              [% END %]
84            </tr>
85          </table>
86        </fieldset>
87        &nbsp;
88        <fieldset>
89          <legend>Metadata (optional)</legend>
90          <table summary="Form for entering metadata about the subject of this node">
91            [% IF config.enable_node_image %]
92              [% INCLUDE node_image_fields.tt %]
93            [% END %]
94
95            <tr>
96              <td class="label"><label for="phone">Phone:</label></td>
97              <td><input type="text" size="50" id="phone" name="phone" value="[% phone %]" /></td>
98              [% IF conflict %]
99                <td>[% CGI.escapeHTML(new_phone) %]</td>
100              [% END %]
101            </tr>
102            <tr>
103              <td class="label"><label for="fax">Fax:</label></td>
104              <td><input type="text" size="50" id="fax" name="fax" value="[% fax %]" /></td>
105              [% IF conflict %]
106                <td>[% CGI.escapeHTML(new_fax) %]</td>
107              [% END %]
108            </tr>
109            <tr>
110              <td class="label"><label for="website">Website:</label></td>
111              <td><input type="text" size="50" id="website" name="website" value="[% website %]" /></td>
112              [% IF conflict %]
113                <td>[% CGI.escapeHTML(new_website) %]</td>
114              [% END %]
115            </tr>
116            <tr>
117              <td class="label"><label for="hours">Opening hours:</label></td>
118              <td><input type="text" size="50" id="hours" name="hours_text" value="[% hours_text %]" /></td>
119              [% IF conflict %]
120                <td>[% CGI.escapeHTML(hours_text) %]</td>
121              [% END %]
122            </tr>
123            <tr>
124              <td class="label"><label for="address">Address:</label></td>
125              <td><input type="text" size="50" id="address" name="address" value="[% address %]" /></td>
126              [% IF conflict %]
127                <td>[% CGI.escapeHTML(new_address) %]</td>
128              [% END %]
129            </tr>
130            <tr>
131              <td class="label"><label for="postcode">Postcode:</label></td>
132              <td><input type="text" size="50" id="postcode" name="postcode" value="[% postcode %]" /></td>
133              [% IF conflict %]
134                <td>[% CGI.escapeHTML(new_postcode) %]</td>
135              [% END %]
136            </tr>
137            <tr>
138              <td class="label"><label for="[% coord_field_1 %]">[% coord_field_1_name %]:</label></td>
139              <td><input type="text" size="50" id="[% coord_field_1 %]" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" /></td>
140              [% IF conflict %]
141                <td>[% CGI.escapeHTML(new_coord_field_1_value) %]</td>
142              [% END %]
143            </tr>
144            <tr>
145              <td class="label"><label for="[% coord_field_2 %]">[% coord_field_2_name %]:</label></td>
146              <td><input type="text" size="50" id="[% coord_field_2 %]" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" /></td>
147              [% IF conflict %]
148                <td>[% CGI.escapeHTML(new_coord_field_2_value) %]</td>
149              [% END %]
150            </tr>
151            <tr>
152              <td class="label"><label for="map_link">Map link:</label></td>
153              <td><input type="text" size="70" id="map_link" name="map_link" value="[% map_link %]" /></td>
154            </tr>
155          </table>
156        </fieldset>
157        &nbsp;
158        [% INCLUDE openguides_information_boxes.tt %]
159      </td>
160    </tr>
161    <tr>
162      <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
163      <td align="center">
164      [% IF moderate %]
165      <input type="submit" name="Save" value="Save changes for moderation" class="form_button" />
166      [% ELSE %]
167      <input type="submit" name="Save" value="Save changes" class="form_button" />
168      [% END %]
169      </td>
170    </tr>
171    <tr>
172      <td colspan="[% IF conflict %]3[% ELSE %]2[% END %]" align="center">
173        <a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a>
174      </td>
175    </tr>
176  </table>
177  <input type="hidden" name="title" value="[% node_name %]" />
178  <input type="hidden" name="checksum" value="[% checksum %]" />
179</form>
180
181[% IF preview_html AND NOT preview_above_edit_box %]
182  <h2>Preview</h2>
183  [% IF summary %]
184    <div id="summary">[% summary %]</div>
185  [% END %]
186  [% INCLUDE display_metadata.tt %]
187  [% preview_html %]
188  <br clear="all" />
189[% END %]
190
191</div>
192[% INCLUDE footer.tt %]
Note: See TracBrowser for help on using the browser.