Marcus Ramberg > Maypole-View-Mason-0.3 > templates/factory/edit

Download:
Maypole-View-Mason-0.3.tar.gz

Annotate this POD

View/Report Bugs
Source  

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.

</%doc>

<& header, %ARGS &>

%foreach my $item (@$objects) { % my $string = $item->stringify_column; <form action="<% $base %>/<% $item->table %>/do_edit/<% $item->id %>" method="post"> <fieldset> <legend> Edit <% $item->$string %></legend> %foreach my $col (@{$classmetadata->{columns}}) { % next if $col eq "id"; <label><span class="field"><% $classmetadata->{colnames}->{$col}%>:</span> <%$item->to_field($col)->as_HTML%> </label> % if ($request->{template_args}->{errors}->{$col}) { <span class="error"> <%$request->{template_args}->{errors}->{$col}%> </font> % } %} <input type="submit" name="edit" value="save"> </fieldset> </form> %}

<& footer, %ARGS &>

syntax highlighting: