]> git.decadent.org.uk Git - maypole.git/blob - templates/factory/edit
f1e0fbfeefe77f0f39b67a0fb1adc41402b122e5
[maypole.git] / templates / factory / edit
1 [%#
2
3 =head1 edit
4
5 This is the edit page. It edits the passed-in object, by displaying a
6 form similar to L<add_new> but with the current values filled in.
7
8 =cut
9
10 #%]
11 [% PROCESS macros %]
12 [% INCLUDE header %]
13 [% FOR item = objects; %]
14 <h2>Edit [% item.name %]</h2>
15 <form action="[% base %]/[% item.table %]/do_edit/[% item.id %]" method=post>
16 [% FOR col = classmetadata.columns;
17     NEXT IF col == "id";
18     "<p>";
19     "<b>"; classmetadata.colnames.$col; "</b>";
20     ": ";
21     item.to_field(col).as_HTML;
22     "</p>";
23     IF errors.$col; 
24         errors.$col;
25     END;
26     '<input type=submit name=edit value=edit />';
27 END %]
28 [% INCLUDE footer %]