Skip to content

Commit

Permalink
Fixed 'required' and error classes for dateinput and textaread
Browse files Browse the repository at this point in the history
  • Loading branch information
trollfot committed Dec 1, 2023
1 parent 63b4922 commit c8ff367
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deform/templates/dateinput.pt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div tal:define="css_class css_class|field.widget.css_class;
oid oid|field.oid;
style style|field.widget.style;
error_class error_class|field.widget.error_class;
type_name type_name|field.widget.type_name;
autofocus autofocus|field.autofocus"
tal:omit-tag="">
Expand All @@ -9,9 +10,10 @@
name="date"
value="${cstruct}"

tal:attributes="class string: ${css_class or ''} form-control hasDatepicker;
tal:attributes="class string:${field.error and error_class or css_class or ''} form-control hasDatepicker;
style style;
autofocus autofocus;
required field.required and 'required' or None;
attributes|field.widget.attributes|{};"
id="${oid}"/>
${field.end_mapping()}
Expand Down
1 change: 1 addition & 0 deletions deform/templates/textarea.pt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
cols cols;
class string: form-control ${css_class or ''};
style style;
required field.required and 'required' or None;
autofocus autofocus;
attributes|field.widget.attributes|{};"
id="${oid}"
Expand Down

0 comments on commit c8ff367

Please sign in to comment.