]> git.decadent.org.uk Git - maypole.git/blob - templates/factory/addnew
18d63d46b7e40886cf294b13a2cdd78204764873
[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 <form id="createform" method="post" action="[% base %]/[% classmetadata.table %]/do_edit/">
14     <fieldset>
15 <legend>Add a new [% classmetadata.moniker %]</legend>
16     [% FOR col = classmetadata.columns %]
17         [% NEXT IF col == "id" %]
18             <label><span class="field">[% classmetadata.colnames.$col %]</span>
19             [% classmetadata.cgi.$col.as_XML; %]
20             </label>
21     [% END; %]
22     <input type="submit" name="create" value="create"/>
23 </fieldset>
24 </form>