View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Marcus Ramberg > Maypole-View-Mason-0.3 > templates/factory/edit


Annotate this POD

View/Report Bugs

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.


<& 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: