]> git.decadent.org.uk Git - maypole.git/blob - templates/factory/addnew
950d89de23dcddf6773585ded94d935a71527e66
[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     <input type="hidden" name="action" value="create"/>
17     [% FOR col = classmetadata.columns %]
18         [% NEXT IF col == "id" %]
19             <label><span class="field">[% classmetadata.colnames.$col %]</span>
20             [% classmetadata.cgi.$col.as_XML; %]
21             </label>
22     [% END; %]
23     <input type="submit" name="create" value="create"/>
24 </fieldset>
25 </form>