From 27930ddf292a31d33e0eae93ff2e696541a7d90f Mon Sep 17 00:00:00 2001 From: Francis Secada Date: Sat, 25 Apr 2026 19:42:55 -0400 Subject: [PATCH 1/6] feat: add input_class and control_class props to form components FormField, Select, Textarea now accept input_class (appended to the main input element's class string). CheckboxGroup accepts control_class (appended to the wrapping
). Both Jinja2 and Cotton template sets updated. Existing tests updated to pass empty defaults; new tests verify prop applied to correct element and default renders without extra class. Closes #1 --- .../cotton/bulma/cf/checkbox-group.html | 4 +- .../templates/cotton/bulma/cf/form-field.html | 4 +- .../templates/cotton/bulma/cf/select.html | 4 +- .../templates/cotton/bulma/cf/textarea.html | 4 +- .../templates/jinja/bulma/CheckboxGroup.jinja | 4 +- .../templates/jinja/bulma/FormField.jinja | 4 +- src/cf_ui/templates/jinja/bulma/Select.jinja | 4 +- .../templates/jinja/bulma/Textarea.jinja | 4 +- tests/unit/cotton/test_forms.py | 70 +++++++++ tests/unit/jinja/test_forms.py | 135 ++++++++++++++++++ 10 files changed, 221 insertions(+), 16 deletions(-) diff --git a/src/cf_ui/templates/cotton/bulma/cf/checkbox-group.html b/src/cf_ui/templates/cotton/bulma/cf/checkbox-group.html index 8b9f0f1..4725c12 100644 --- a/src/cf_ui/templates/cotton/bulma/cf/checkbox-group.html +++ b/src/cf_ui/templates/cotton/bulma/cf/checkbox-group.html @@ -1,7 +1,7 @@ - +
-
+
{% for choice in choices %}