]> git.decadent.org.uk Git - maypole.git/blob - templates/factory/edit
fixed layout and made factory templates xhtml compliant
[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 <form action="[% base %]/[% item.table %]/do_edit/[% item.id %]" method="post">
15 <fieldset>
16 <legend>Edit [% item.name %]</legend>
17 [% FOR col = classmetadata.columns;
18     NEXT IF col == "id";
19     '<label><span class="field">';
20     classmetadata.colnames.$col; ":</span>";
21     item.to_field(col).as_XML;
22     "</label>";
23     IF errors.$col; 
24        '<span class="error">'; errors.$col;'</span>';
25     END;
26     END;
27     '<input type="submit" name="edit" value="edit"/>';
28     "</fieldset></form>";
29     
30     END %]
31
32 [% INCLUDE footer %]