]> git.decadent.org.uk Git - maypole.git/blob - templates/factory/addnew
XHTML update
[maypole.git] / templates / factory / addnew
1 [%#
2
3 =head1 addnew
4
5 This is the interface to adding a new instance of an object. (or a new
6 row in the database, if you want to look at it that way) It displays a
7 form containing a list of HTML components for each of the columns in the
8 table.
9
10 =cut
11
12 #%]
13 <h3>Add a new [% classmetadata.moniker %]</h3>
14 <form method="post" action="[% base %]/[% classmetadata.table %]/do_edit/">
15     <input type="hidden" name="action" value="create"/>
16     <table class="view">
17     [% FOR col = classmetadata.columns %]
18         [% NEXT IF col == "id" %]
19         <tr>
20             <td>[% classmetadata.colnames.$col %]</td>
21             <td>[% classmetadata.cgi.$col.as_HTML; %]</td>
22         </tr>
23     [% END; %]
24     </table>
25     <input type="submit" name="create" value="create"/>
26 </form>