From ac1aed463127b6db7839b9e39defa440af10b01a Mon Sep 17 00:00:00 2001 From: Kevin Palmowski Date: Tue, 9 Jan 2024 23:28:10 +0000 Subject: [PATCH] [#398] Add form-select CSS class to select elements in multiple form_snippets --- .../scheming/templates/scheming/form_snippets/datetime_tz.html | 2 +- .../scheming/templates/scheming/form_snippets/organization.html | 2 +- ckanext/scheming/templates/scheming/form_snippets/select.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ckanext/scheming/templates/scheming/form_snippets/datetime_tz.html b/ckanext/scheming/templates/scheming/form_snippets/datetime_tz.html index 15f96713..f09dc741 100644 --- a/ckanext/scheming/templates/scheming/form_snippets/datetime_tz.html +++ b/ckanext/scheming/templates/scheming/form_snippets/datetime_tz.html @@ -55,7 +55,7 @@ selected=tz, error=errors[field.field_name + '_tz'], classes=field.classes if 'classes' in field else ['control-medium'], - attrs=dict({"class": "form-control"}, **(field.get('form_attrs', {}))), + attrs=dict({"class": "form-control form-select"}, **(field.get('form_attrs', {}))), is_required=h.scheming_field_required(field) ) %} diff --git a/ckanext/scheming/templates/scheming/form_snippets/organization.html b/ckanext/scheming/templates/scheming/form_snippets/organization.html index 210f8d23..aa756b98 100644 --- a/ckanext/scheming/templates/scheming/form_snippets/organization.html +++ b/ckanext/scheming/templates/scheming/form_snippets/organization.html @@ -24,7 +24,7 @@
- {% for option in [('True', _('Private')), ('False', _('Public'))] %} {% endfor %} diff --git a/ckanext/scheming/templates/scheming/form_snippets/select.html b/ckanext/scheming/templates/scheming/form_snippets/select.html index 1098d83a..de889c24 100644 --- a/ckanext/scheming/templates/scheming/form_snippets/select.html +++ b/ckanext/scheming/templates/scheming/form_snippets/select.html @@ -30,7 +30,7 @@ selected=option_selected, error=errors[field.field_name], classes=field.classes if 'classes' in field else ['control-medium'], - attrs=dict({"class": "form-control"}, **(field.get('form_attrs', {}))), + attrs=dict({"class": "form-control form-select"}, **(field.get('form_attrs', {}))), is_required=h.scheming_field_required(field) ) %}