more tests and moosification
This commit is contained in:
parent
7ee8fec611
commit
631f6ad267
7 changed files with 109 additions and 72 deletions
|
|
@ -119,18 +119,18 @@ Return the HTML for the form
|
|||
|
||||
=cut
|
||||
|
||||
sub toHtml {
|
||||
override 'toHtml' => sub {
|
||||
my ( $self ) = @_;
|
||||
|
||||
my @attrs = qw{ action method name enctype };
|
||||
my $attrs = join " ", map { qq{$_="} . $self->get($_) . qq{"} } @attrs;
|
||||
my $attrs = join " ", map { qq{$_="} . $self->$_ . qq{"} } grep { $self->$_ } @attrs;
|
||||
|
||||
my $html = sprintf '<form %s>', $attrs;
|
||||
$html .= $self->maybe::next::method;
|
||||
$html .= super();
|
||||
$html .= '</form>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
};
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue