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