Skip to content

Commit

Permalink
Added invalid class at the wrapper level in checkbox_choice template …
Browse files Browse the repository at this point in the history
…to display the feedback
  • Loading branch information
trollfot committed Nov 30, 2023
1 parent 3e9485b commit 63b4922
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions deform/templates/checkbox_choice.pt
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<div tal:define="css_class css_class|field.widget.css_class;
style style|field.widget.style;
oid oid|field.oid;
error_class error_class|field.widget.error_class;
inline getattr(field.widget, 'inline', False);
autofocus autofocus|field.autofocus">
autofocus autofocus|field.autofocus"
tal:attributes="class field.error and error_class or None">
${field.start_sequence()}
<div tal:repeat="choice values | field.widget.values"
tal:attributes="class string:form-check ${inline and 'form-check-inline' or ''}">
<tal:choice tal:define="(value, title) choice">
<input tal:attributes="checked value in cstruct;
class string:form-check-input css_class;
class string:form-check-input ${field.error and error_class or css_class};
style style;
autofocus not repeat.choice.index and autofocus;
attributes|field.widget.attributes|{};"
Expand Down

0 comments on commit 63b4922

Please sign in to comment.