Permalink
Browse files

add type_attr to Select field; update t/render/ff.t to use it

  • Loading branch information...
1 parent 71c896b commit a50e5aec00cacb0f8c3dfb87a90396844c03e796 @gshank committed Feb 28, 2013
Showing with 2 additions and 1 deletion.
  1. +1 −0 lib/HTML/FormHandler/Field/Select.pm
  2. +1 −1 t/render/ff.t
@@ -402,6 +402,7 @@ has 'active_column' => ( isa => 'Str', is => 'rw', default => 'active'
has 'auto_widget_size' => ( isa => 'Int', is => 'rw', default => '0' );
has 'sort_column' => ( isa => 'Str|ArrayRef[Str]', is => 'rw' );
has '+widget' => ( default => 'Select' );
+has '+type_attr' => ( default => 'select' );
has 'empty_select' => ( isa => 'Str', is => 'rw' );
has '+deflate_method' => ( default => sub { \&select_deflate } );
has '+input_without_param' => ( lazy => 1, builder => 'build_input_without_param' );
View
@@ -13,7 +13,7 @@ use HTML::FormHandler::Test;
my $class = $attr->{class} || [];
if( $type eq 'wrapper' ) {
# this is not exactly like what FF does, but it's close
- push @$class, lc $field->type;
+ push @$class, $field->type_attr;
push @$class, 'label' if $field->do_label;
$attr->{class} = $class;
}

0 comments on commit a50e5ae

Please sign in to comment.