--- trunk/lib/Frey/Action.pm 2008/11/28 17:18:56 595
+++ trunk/lib/Frey/Action.pm 2008/11/30 15:13:32 640
@@ -134,6 +134,10 @@
$default->{$name} = $config_params->[0]->{$name};
} elsif ( $attr->has_type_constraint && $attr->type_constraint->can('values') ) {
$value_html = select_values( $name, $attr_type, $attr->type_constraint->values );
+ } elsif ( $attr_type =~ m{^Bool} ) {
+ my $suffix = '';
+ $suffix = ' checked' if $value;
+ $value_html = qq||;
} elsif ( $attr_type !~ m{^(Str|Int)$} ) {
$value_html = qq||;
}
@@ -142,14 +146,7 @@
$default->{$name} = $value unless defined $default->{$name};
- if ( ! $value_html ) {
- my $suffix = '';
- if ( $attr_type =~ m{^Bool$} ) {
- $type = 'checkbox';
- $suffix = ' checked' if $value;
- }
- $value_html = qq||;
- }
+ $value_html = qq|| unless $value_html;
# warn "# required $name ", $class->meta->get_attribute( $name )->dump( 2 );
$form .= qq|| . $value_html;