Skip to content

Commit

Permalink
no element attributes in selection options; 'label_after' in bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank committed Mar 23, 2012
1 parent 9956b02 commit 8dcc1b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/HTML/FormHandler/Widget/Field/Select.pm
Expand Up @@ -45,7 +45,6 @@ sub render {
$output .= ' selected="selected"';
}
}
$output .= $ele_attributes;
my $label = $option->{label};
$label = $self->_localize($label) if $self->localize_labels;
$output .= '>' . ( $self->html_filter($label) || '' ) . '</option>';
Expand Down
3 changes: 2 additions & 1 deletion lib/HTML/FormHandler/Widget/Wrapper/Bootstrap.pm
Expand Up @@ -37,8 +37,9 @@ sub wrap_field {
# wrapper is always a div
$output .= qq{\n<div$attr_str>}
if $self->do_wrapper;
if ( $self->do_label && length( $self->label ) > 0 ) {
if ( $self->do_label ) {
my $label = $self->html_filter($self->loc_label);
$label .= $self->get_tag('label_after');
$output .= qq{\n<label class="control-label" for="} . $self->id . qq{">$label</label>};
}
$output .= $self->get_tag('before_element');
Expand Down

0 comments on commit 8dcc1b7

Please sign in to comment.