Closed Sadrak closed 5 years ago
i guess this pull-request is not what you wanted. Still the commit with the closing tag is included.
If it is wrong, please close and i will try again.
Today i fall again over this trap.
i use twitter bootstrap and HTML::FormFu via default_args:
$form->default_args({
elements => {
Field => {
error_tag => 'span',
error_attributes => {
class => 'control-label',
},
...
This error_attributes
is ignored. In HTML::FormFu::Role::Element::Field
is a error_attributes
, but in around render_data_non_recursive
this is not used and later in _render_error_class
is a switch for that case also missing.
Should this be a new ticket?
On 04/05/15 19:47, Felix Ostmann wrote:
Today i fall again over this trap.
i use twitter bootstrap and HTML::FormFu via default_args:
$form->default_args({ elements => { Field => { error_tag => 'span', error_attributes => { class => 'control-label', }, ... This |error_attributes| is ignored. In |HTML::FormFu::Role::Element::Field| is a |error_attributes|, but in |around render_data_non_recursive| this is not used and later in |_render_error_class| is a switch for that case also missing.
— Reply to this email directly or view it on GitHub https://github.com/fireartist/HTML-FormFu/pull/30#issuecomment-98653951.
i thought this is a new & open ticket.
i opened this after your last message.
This only contains failing tests, not a solution.
Thanks - this should be resolved now with 93bbdb9e9aca419bc1a42947d2046dd810df256a
I have a problem with using error_attributes. Changing in the same file error.attributes to self.error_attributes work, but then the behavior when a error_container_tag is set is broken. I don't get what is the problem there, but error_attributes and error_container_attributes won't work properly.
Example: error_attributes => { class => 'help-block', }, =>
VS
error_container_tag => 'div', error_container_attributes => { class => 'test', }, error_attributes => { class => 'help-block', }, =>