|
if ( $self->has_flag('is_compound') && not exists $attr->{id} && ! $self->get_tag('no_wrapper_id') ); |
Specifying "has_field field_name => ( tags => { no_wrapper_id => 1 } )" does not make it false because this line evaluates to
$self->has_flag('is_compound') && not (exists $attr->{id} && !$self->get_tag('no_wrapper_id'))
I think the following is correct.
$self->has_flag('is_compound') && !exists $attr->{id} && !$self->get_tag('no_wrapper_id')
Patch for private FreeBSD ports tree.
--- lib/HTML/FormHandler/Field.pm.orig 2017-07-20 16:51:00 UTC
+++ lib/HTML/FormHandler/Field.pm
@@ -464,7 +464,7 @@ sub wrapper_attributes {
$attr->{class} = $class if @$class;
# add id if compound field and id doesn't exist unless 'no_wrapper_id' tag
$attr->{id} = $self->id
- if ( $self->has_flag('is_compound') && not exists $attr->{id} && ! $self->get_tag('no_wrapper_id') );
+ if ( $self->has_flag('is_compound') && !exists $attr->{id} && ! $self->get_tag('no_wrapper_id') );
# call form hook
my $mod_attr = $self->form->html_attributes($self, 'wrapper', $attr, $result) if $self->form;
return ref($mod_attr) eq 'HASH' ? $mod_attr : $attr;
html-formhandler/lib/HTML/FormHandler/Field.pm
Line 1017 in b032539
Specifying "has_field field_name => ( tags => { no_wrapper_id => 1 } )" does not make it false because this line evaluates to
I think the following is correct.
Patch for private FreeBSD ports tree.
--- lib/HTML/FormHandler/Field.pm.orig 2017-07-20 16:51:00 UTC +++ lib/HTML/FormHandler/Field.pm @@ -464,7 +464,7 @@ sub wrapper_attributes { $attr->{class} = $class if @$class; # add id if compound field and id doesn't exist unless 'no_wrapper_id' tag $attr->{id} = $self->id - if ( $self->has_flag('is_compound') && not exists $attr->{id} && ! $self->get_tag('no_wrapper_id') ); + if ( $self->has_flag('is_compound') && !exists $attr->{id} && ! $self->get_tag('no_wrapper_id') ); # call form hook my $mod_attr = $self->form->html_attributes($self, 'wrapper', $attr, $result) if $self->form; return ref($mod_attr) eq 'HASH' ? $mod_attr : $attr;