Skip to content

Commit

Permalink
Merge pull request #399 from themowski/398-add-form-select-class
Browse files Browse the repository at this point in the history
[Fix #398] Add `form-select` CSS class to `select` elements
  • Loading branch information
wardi authored Jan 23, 2024
2 parents 8646a9d + ac1aed4 commit 2d3c5c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="control-group form-group control-medium">
<label for="field-private" class="control-label">{{ _('Visibility') }}</label>
<div class="controls">
<select id="field-private" name="private" class="form-control">
<select id="field-private" name="private" class="form-control form-select">
{% for option in [('True', _('Private')), ('False', _('Public'))] %}
<option value="{{ option[0] }}" {% if option[0] == data.private|trim %}selected="selected"{% endif %}>{{ option[1] }}</option>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
%}
Expand Down

0 comments on commit 2d3c5c1

Please sign in to comment.