Simon Cozens > Maypole > templates/factory/edit

Download:
Maypole-1.7.tar.gz

Annotate this POD

CPAN RT

New  7
Open  5
View/Report Bugs
Source   Latest Release: Maypole-2.10

edit ^

This is the edit page. It edits the passed-in object, by displaying a form similar to add_new but with the current values filled in.

#%]

[% PROCESS macros %] [% INCLUDE header %]

[% FOR item = objects; %] <h2> Edit [% item.name %]</h2>

<FORM ACTION="[% base %]/[% item.table %]/do_edit/[% item.id %]" METHOD="post"> [% FOR col = classmetadata.columns; NEXT IF col == "id"; "<P>"; "<B>"; classmetadata.colnames.$col; "</B>"; ": "; item.to_field(col).as_HTML; "</P>"; IF errors.$col; "<FONT COLOR=\"#ff0000\">"; errors.$col; "</FONT>"; END; END; '<INPUT TYPE="submit" NAME="edit" VALUE="edit">'; END %] [% INCLUDE footer %]

syntax highlighting: