Changeset 558


Ignore:
Timestamp:
Nov 23, 2004, 7:18:59 PM (17 years ago)
Author:
kake
Message:

Fixed validation errors and indentation.

Location:
trunk/templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/edit_form.tt

    r557 r558  
    11[% INCLUDE header.tt page_title = "Edit $node_name - $site_name" %]
    22<div id="content">
    3 <h1 align="center">Edit "[% node_name %]"</h1>
     3
     4<h1 align="center">Edit &quot;[% node_name %]&quot;</h1>
    45
    56[% IF preview_html AND preview_above_edit_box %]
    67  <h2>Preview</h2>
    78  [% INCLUDE display_metadata.tt %]
    8 
    99  [% preview_html %]
    10 
    1110  <br clear="all" />
    12 
    1311[% END %]
    1412
    1513<form action="[% cgi_url %]" method="POST" enctype="application/x-www-form-urlencoded">
    16 <table summary="Form for editing page attributes">
    17   [% TRY %]
     14  <table summary="Form for editing page attributes">
    1815    <tr>
    1916      <td colspan="2">
    20         [% INCLUDE custom_licence.tt %]
     17        [%# Put the td outside the TRY-CATCH because TT will print everything
     18            up to where it gets the error - avoid mismatched tags. %]
     19        [% TRY %]
     20          [% INCLUDE custom_licence.tt %]
     21        [% CATCH %]
     22        [% END %]
    2123      </td>
    2224    </tr>
    23   [% CATCH %]
    24   [% END %]
    25   <tr>
    26     <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
    27     <td align="center"><input type="submit" name="Save" value="Save changes" class="form_button" /></td>
    28   </tr>
    29   <tr>
    30     <td colspan="2" align="center"><a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a></td>
    31   </tr>
    32   <tr>
    33     <td colspan="2">
    34     <fieldset>
    35     <legend>Main information (required)</legend>
    36     <table summary="Fields containing the node's main content and its category and locale listings">
    37       <tr>
    38         <td class="label"><label for="content">Content:</label></td>
    39         <td><textarea name="content" id="content" rows="21" cols="70" wrap="virtual">[% content %]</textarea></td>
    40       </tr>
    41       <tr>
    42         <td class="label"><label for="locales">Locales:<br />(one per line)</label></td>
     25    <tr>
     26      <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
     27      <td align="center"><input type="submit" name="Save" value="Save changes" class="form_button" /></td>
     28    </tr>
     29    <tr>
     30      <td colspan="2" align="center"><a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a></td>
     31    </tr>
     32    <tr>
     33      <td colspan="2">
     34        <fieldset>
     35          <legend>Main information (required)</legend>
     36          <table summary="Fields containing the node's main content and its category and locale listings">
     37            <tr>
     38              <td class="label"><label for="content">Content:</label></td>
     39              <td><textarea name="content" id="content" rows="21" cols="70" wrap="virtual">[% content %]</textarea></td>
     40            </tr>
     41            <tr>
     42              <td class="label"><label for="locales">Locales:<br />(one per line)</label></td>
    4343[%# NOTE: The whitespace in the next two textareas is deliberate, to avoid
    44     getting bogus tabs and blank lines in the textarea content.  Please
    45     do not reintroduce this bug.  Test on more than one browser. #%]
    46         <td><textarea name="locales" id="locales" rows="5" cols="70">[% FOREACH locale = locales %][% locale.name %]
     44  getting bogus tabs and blank lines in the textarea content.  Please
     45  do not reintroduce this bug.  Test on more than one browser. #%]
     46              <td><textarea name="locales" id="locales" rows="5" cols="70">[% FOREACH locale = locales %][% locale.name %]
    4747[% END %]</textarea></td>
    48       </tr>
    49       <tr>
    50         <td class="label"><label for="categories">Categories:<br />(one per line)</label></td>
    51         <td><textarea name="categories" id="categories" rows="5" cols="70">[% FOREACH category = categories %][% category.name %]
     48            </tr>
     49            <tr>
     50              <td class="label"><label for="categories">Categories:<br />(one per line)</label></td>
     51              <td><textarea name="categories" id="categories" rows="5" cols="70">[% FOREACH category = categories %][% category.name %]
    5252[% END %]</textarea></td>
    53       </tr>
    54     </table>
    55     </fieldset>
    56     &nbsp;
    57     <fieldset>
    58     <legend>Metadata (optional)</legend>
    59     <table summary="Form for entering metadata about the subject of this node">
    60       <tr>
    61         <td class="label"><label for="phone">Phone:</label></td>
    62         <td><input type="text" size="50" id="phone" name="phone" value="[% phone %]"></td>
    63       </tr>
    64       <tr>
    65         <td class="label"><label for="fax">Fax:</label></td>
    66         <td><input type="text" size="50" id="fax" name="fax" value="[% fax %]"></td>
    67       </tr>
     53            </tr>
     54          </table>
     55        </fieldset>
     56        &nbsp;
     57        <fieldset>
     58          <legend>Metadata (optional)</legend>
     59          <table summary="Form for entering metadata about the subject of this node">
    6860            <tr>
    69         <td class="label"><label for="website">Website:</label></td>
    70         <td><input type="text" size="50" id="website" name="website" value="[% website %]"></td>
    71       </tr>
     61              <td class="label"><label for="phone">Phone:</label></td>
     62              <td><input type="text" size="50" id="phone" name="phone" value="[% phone %]" /></td>
     63            </tr>
    7264            <tr>
    73         <td class="label"><label for="hours">Opening hours:</label></td>
    74         <td><input type="text" size="50" id="hours" name="hours_text" value="[% hours_text %]"></td>
    75       </tr>
     65              <td class="label"><label for="fax">Fax:</label></td>
     66              <td><input type="text" size="50" id="fax" name="fax" value="[% fax %]" /></td>
     67            </tr>
    7668            <tr>
    77         <td class="label"><label for="address">Address:</label></td>
    78         <td><input type="text" size="50" id="address" name="address" value="[% address %]"></td>
    79       </tr>
     69              <td class="label"><label for="website">Website:</label></td>
     70              <td><input type="text" size="50" id="website" name="website" value="[% website %]" /></td>
     71            </tr>
    8072            <tr>
    81         <td class="label"><label for="postcode">Postcode:</label></td>
    82         <td><input type="text" size="50" id="postcode" name="postcode" value="[% postcode %]"></td>
    83       </tr>
     73              <td class="label"><label for="hours">Opening hours:</label></td>
     74              <td><input type="text" size="50" id="hours" name="hours_text" value="[% hours_text %]" /></td>
     75            </tr>
    8476            <tr>
    85         <td class="label"><label for="os_x">OS X coordinate:</label></td>
    86         <td><input type="text" size="50" id="os_x" name="os_x" value="[% os_x %]">
    87       </tr>
     77              <td class="label"><label for="address">Address:</label></td>
     78              <td><input type="text" size="50" id="address" name="address" value="[% address %]" /></td>
     79            </tr>
    8880            <tr>
    89         <td class="label"><label for="os_y">OS Y coordinate:</label></td>
    90         <td><input type="text" size="50" id="os_y" name="os_y" value="[% os_y %]"></td>
    91       </tr>
     81              <td class="label"><label for="postcode">Postcode:</label></td>
     82              <td><input type="text" size="50" id="postcode" name="postcode" value="[% postcode %]" /></td>
     83            </tr>
    9284            <tr>
    93         <td class="label"><label for="map_link">Map link:</label></td>
    94         <td><input type="text" size="70" id="map_link" name="map_link" value="[% map_link %]"></td>
    95       </tr>
    96     </table>
    97     </fieldset>
    98     &nbsp;
    99     [% INCLUDE openguides_information_boxes.tt %]
    100     </td>
    101   </tr>
    102   <tr>
    103     <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
    104     <td align="center"><input type="submit" name="Save" value="Save changes" class="form_button" /></td>
    105   </tr>
    106   <tr>
    107     <td colspan="2" align="center"><a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a></td>
    108   </tr>
    109 </table>
    110 <input type="hidden" name="title" value="[% node_name %]">
    111 <input type="hidden" name="checksum" value="[% checksum %]" />
     85              <td class="label"><label for="os_x">OS X coordinate:</label></td>
     86              <td><input type="text" size="50" id="os_x" name="os_x" value="[% os_x %]" /></td>
     87            </tr>
     88            <tr>
     89              <td class="label"><label for="os_y">OS Y coordinate:</label></td>
     90              <td><input type="text" size="50" id="os_y" name="os_y" value="[% os_y %]" /></td>
     91            </tr>
     92            <tr>
     93              <td class="label"><label for="map_link">Map link:</label></td>
     94              <td><input type="text" size="70" id="map_link" name="map_link" value="[% map_link %]" /></td>
     95            </tr>
     96          </table>
     97        </fieldset>
     98        &nbsp;
     99        [% INCLUDE openguides_information_boxes.tt %]
     100      </td>
     101    </tr>
     102    <tr>
     103      <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
     104      <td align="center"><input type="submit" name="Save" value="Save changes" class="form_button" /></td>
     105    </tr>
     106    <tr>
     107      <td colspan="2" align="center">
     108        <a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a>
     109      </td>
     110    </tr>
     111  </table>
     112  <input type="hidden" name="title" value="[% node_name %]" />
     113  <input type="hidden" name="checksum" value="[% checksum %]" />
    112114</form>
    113115
     
    115117  <h2>Preview</h2>
    116118  [% INCLUDE display_metadata.tt %]
    117 
    118119  [% preview_html %]
    119 
    120120  <br clear="all" />
    121 
    122121[% END %]
    123122
  • trunk/templates/openguides_information_boxes.tt

    r557 r558  
    11<fieldset>
    2 <legend>OpenGuides information</legend>
    3 <table summary="Fields for entering information about the changes being made to this page">
    4   <tr>
    5     <td>
    6       <strong><label for="username">Your username</label> (<a href="preferences.cgi">set</a>)</strong>
    7     </td>
    8     <td>
    9        <input type="text" size="30" name="username" id="username" value="[% username %]">
    10     </td>
    11   </tr>
    12   <tr>
    13     <td><strong><label for="comment">Comment about your changes:</label></strong></td>
    14     <td><input type="text" size="30" name="comment" id="comment" value="[% comment %]"></td>
    15   </tr>
    16   <tr>
    17     <td><strong><label for="edit_type">Type of edit:</label></strong></td>
    18     <td>
    19       <select name="edit_type" id="edit_type">
    20         <option [% IF edit_type == "Normal edit" %] selected="1" [% END %] value="Normal edit">Normal edit</option>
    21         <option [% IF edit_type == "Minor tidying" %] selected="1" [% END %] value="Minor tidying">Minor tidying</option>
    22       </select>
    23     </td>
    24   </tr>
    25 </table>
     2  <legend>OpenGuides information</legend>
     3  <table summary="Fields for entering information about the changes being made to this page">
     4    <tr>
     5      <td>
     6        <strong><label for="username">Your username</label> (<a href="preferences.cgi">set</a>)</strong>
     7      </td>
     8      <td>
     9        <input type="text" size="30" name="username" id="username" value="[% username %]" />
     10      </td>
     11    </tr>
     12    <tr>
     13      <td><strong><label for="comment">Comment about your changes:</label></strong></td>
     14      <td><input type="text" size="30" name="comment" id="comment" value="[% comment %]" /></td>
     15    </tr>
     16    <tr>
     17      <td><strong><label for="edit_type">Type of edit:</label></strong></td>
     18      <td>
     19        <select name="edit_type" id="edit_type">
     20          <option [% IF edit_type == "Normal edit" %] selected="1" [% END %] value="Normal edit">Normal edit</option>
     21          <option [% IF edit_type == "Minor tidying" %] selected="1" [% END %] value="Minor tidying">Minor tidying</option>
     22        </select>
     23      </td>
     24    </tr>
     25  </table>
    2626</fieldset>
Note: See TracChangeset for help on using the changeset viewer.