]> git.decadent.org.uk Git - maypole.git/blob - templates/factory/addnew
Use table instead of moniker.
[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      %]
20      <TR> <TD class="field"> [% classmetadata.colnames.$col; %] </TD>
21      <TD> [% classmetadata.cgi.$col.as_HTML; %] </TD> </TR>
22     [% END; %]
23     </TABLE>
24     <INPUT TYPE="submit" NAME="create" VALUE="create">
25 </FORM>