Skip to content

Commit 71e6bf7

Browse files
John Pintogjacob24
John Pinto
andcommitted
Add border and arrow for dropdown fields.
Contributed by @gjacob24 of DCC DMPonline. The changes: - Replaced Selection_tag classes incorrectly set with 'form-control' to 'form-select'. Co-authored-by: gjacob24 <[email protected]>
1 parent e5fc72b commit 71e6bf7

File tree

10 files changed

+22
-22
lines changed

10 files changed

+22
-22
lines changed

app/views/devise/registrations/_personal_details.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
options_from_collection_for_select(departments, "id", "name", dept_id),
4646
include_blank: true,
4747
disabled: departments.count === 0,
48-
class: "form-control") %>
48+
class: "form-select") %>
4949
</div>
5050
<% end %>
5151

@@ -55,7 +55,7 @@
5555
<%= f.label(:language_id, _('Language'), class: 'form-label') %>
5656
<%= select_tag("user[language_id]",
5757
options_from_collection_for_select(@languages, "id", "name", lang_id),
58-
class: "form-control") %>
58+
class: "form-select") %>
5959
</div>
6060
<% end %>
6161

app/views/layouts/modal_search/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Example definition of the :filters content:
138138
<%= select_tag :"research_output[subject_filter]",
139139
options_for_select(ResearchOutputPresenter.selectable_subjects),
140140
include_blank: _("- Select a subject area -"),
141-
class: "form-control",
141+
class: "form-select",
142142
title: by_subject_tooltip,
143143
data: { toggle: "tooltip", placement: "bottom" } %>
144144
</span>
@@ -147,7 +147,7 @@ Example definition of the :filters content:
147147
<%= select_tag :"research_output[type_filter]",
148148
options_for_select(ResearchOutputPresenter.selectable_repository_types),
149149
include_blank: _("- Select a repository type -"),
150-
class: "form-control",
150+
class: "form-select",
151151
title: by_type_tooltip,
152152
data: { toggle: "tooltip", placement: "bottom" } %>
153153
</span>

app/views/org_admin/users/edit.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<%= select_tag(:department_id,
3333
options_from_collection_for_select(@departments, "id", "name", dept_id),
3434
include_blank: true,
35-
class: "form-control",
35+
class: "form-select",
3636
name: 'user[department_id]') %>
3737
</div>
3838
<% end %>
@@ -44,7 +44,7 @@
4444
<%= select_tag(:org_admin_user_language_id,
4545
options_from_collection_for_select(Language.sorted_by_abbreviation, "id", "name", lang_id),
4646
disabled: true,
47-
class: "form-control", name: 'org_admin_user[language_id]') %>
47+
class: "form-select", name: 'org_admin_user[language_id]') %>
4848
</div>
4949
<% end %>
5050

app/views/plans/_download_form.html.erb

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="row">
88
<div class="form-control mb-3 col-sm-2">
99
<%= select_tag :format, options_for_select(Settings::Template::VALID_FORMATS, :pdf),
10-
class: 'form-control', "aria-labelledby": "format" %>
10+
class: 'form-select', "aria-labelledby": "format" %>
1111
</div>
1212
</div>
1313

@@ -17,7 +17,7 @@
1717
<% if @phase_options.length > 1 %>
1818
<div class="form-control mb-5">
1919
<%= label_tag(:phase_id, _("Select phase to download"), class: 'form-label') %>
20-
<%= select_tag(:phase_id, options_for_select(@phase_options, @phase_options[0])) %>
20+
<%= select_tag(:phase_id, options_for_select(@phase_options, @phase_options[0]), class: 'form-select') %>
2121
</div>
2222
<% else %>
2323
<%= hidden_field_tag(:phase_id, @phase_options[0][1]) %>
@@ -77,14 +77,14 @@
7777
<%= select_tag "export[formatting][font_face]",
7878
options_for_select(Settings::Template::VALID_FONT_FACES,
7979
@export_settings.formatting[:font_face]),
80-
class: 'form-control',
80+
class: 'form-select',
8181
"data-default": @plan.template.settings(:export).formatting[:font_face] %>
8282
</div>
8383
<div class="form-control mb-3 px-2 col-sm-2">
8484
<%= label_tag "export[formatting][font_size]", _('Size') + " (pt)", class: 'form-label' %>
8585
<%= select_tag "export[formatting][font_size]",
8686
options_for_select(Settings::Template::VALID_FONT_SIZE_RANGE.to_a, @export_settings.formatting[:font_size]),
87-
class: 'form-control',
87+
class: 'form-select',
8888
"data-default": @plan.template.settings(:export).formatting[:font_size] %>
8989
</div>
9090

@@ -94,7 +94,7 @@
9494
<%= select_tag "export[formatting][margin][top]",
9595
options_for_select(Settings::Template::VALID_MARGIN_RANGE.to_a,
9696
@export_settings.formatting[:margin][:top]),
97-
class: 'form-control',
97+
class: 'form-select',
9898
"data-default": @plan.template.settings(:export).formatting[:margin][:top] %>
9999
</div>
100100
<div class="form-control mb-3 px-2 col-sm-1">
@@ -103,7 +103,7 @@
103103
<%= select_tag "export[formatting][margin][bottom]",
104104
options_for_select(Settings::Template::VALID_MARGIN_RANGE.to_a,
105105
@export_settings.formatting[:margin][:bottom]),
106-
class: 'form-control',
106+
class: 'form-select',
107107
"data-default": @plan.template.settings(:export).formatting[:margin][:bottom] %>
108108
</div>
109109
<div class="form-control mb-3 px-2 col-sm-1">
@@ -112,7 +112,7 @@
112112
<%= select_tag "export[formatting][margin][left]",
113113
options_for_select(Settings::Template::VALID_MARGIN_RANGE.to_a,
114114
@export_settings.formatting[:margin][:left]),
115-
class: 'form-control',
115+
class: 'form-select',
116116
"data-default": @plan.template.settings(:export).formatting[:margin][:left] %>
117117
</div>
118118
<div class="form-control mb-3 px-2 col-sm-1">
@@ -121,7 +121,7 @@
121121
<%= select_tag "export[formatting][margin][right]",
122122
options_for_select(Settings::Template::VALID_MARGIN_RANGE.to_a,
123123
@export_settings.formatting[:margin][:right]),
124-
class: 'form-control',
124+
class: 'form-select',
125125
"data-default": @plan.template.settings(:export).formatting[:margin][:right] %>
126126
</div>
127127
</div>

app/views/plans/new.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
<div class="form-control mb-3 row">
108108
<div class="col-md-6">
109109
<%= select_tag(:plan_template_id, "<option value=\"\">#{_('Please select a template')}</option>", name: 'plan[template_id]',
110-
class: 'form-control', 'aria-labelledby': 'template-selection') %>
110+
class: 'form-select', 'aria-labelledby': 'template-selection') %>
111111
</div>
112112
<div class="col-md-6">
113113
<span id="multiple-templates">

app/views/questions/_new_edit_question_option_based.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
options_html.html_safe,
3535
{ multiple: question.question_format.multiselectbox?,
3636
include_blank: question.question_format.dropdown?,
37-
class: 'form-control' }) %>
37+
class: 'form-select' }) %>
3838
<% end %>
3939
<div class="form-control mb-3">
4040
<% if question.option_comment_display %><!-- Comment text area for option_based questions -->

app/views/research_outputs/licenses/_form.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ show_preferred = selected.nil? || (selected != 0 && preferred_licenses.map { |ar
1616
options = show_preferred ? preferred_licenses : presenter.complete_licenses
1717
guidance = show_preferred ? preferred_guidance : default_guidance
1818

19-
args = { include_blank: _("- Please select one -"), selected: selected, class: "form-control",
19+
args = { include_blank: _("- Please select one -"), selected: selected, class: "form-select",
2020
aria: { label: _('Initial license') } }
2121
args[:data] = { remote: true, url: plan_license_selection_path(research_output.plan), method: :get } if show_preferred
2222
%>

app/views/research_outputs/repositories/_search.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<%= select_tag :"research_output[subject_filter]",
1111
options_for_select(ResearchOutputPresenter.selectable_subjects),
1212
include_blank: _("- Select a subject area -"),
13-
class: "form-control",
13+
class: "form-select",
1414
aria: { label: _('Select a subject area') },
1515
title: by_subject_tooltip,
1616
data: { toggle: "tooltip", placement: "bottom" } %>
@@ -20,7 +20,7 @@
2020
<%= select_tag :"research_output[type_filter]",
2121
options_for_select(ResearchOutputPresenter.selectable_repository_types),
2222
include_blank: _("- Select a repository type -"),
23-
class: "form-control",
23+
class: "form-select",
2424
aria: { label: _('Select a repository type') },
2525
title: by_type_tooltip,
2626
data: { toggle: "tooltip", placement: "bottom" } %>

app/views/super_admin/users/_confirm_merge.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<span class="input-group-text" id="search-addon">
99
<span class="fas fa-magnifying-glass" aria-hidden="true"></span>
1010
</span>
11-
<%= select_tag(:merge_id, options_from_collection_for_select(@users, "id", "email"), class: "form-control") %>
11+
<%= select_tag(:merge_id, options_from_collection_for_select(@users, "id", "email"), class: "form-select") %>
1212
</div>
1313
</div>
1414
<%= submit_tag( _("Merge"), class: 'btn btn-secondary', style: 'margin-top: 8px;', data: { confirm: "placeholder" }) %>

app/views/super_admin/users/edit.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<%= select_tag(:department_id,
4343
options_from_collection_for_select(@departments, "id", "name", dept_id),
4444
include_blank: true,
45-
class: "form-control",
45+
class: "form-select",
4646
name: 'user[department_id]') %>
4747
</div>
4848
<% end %>
@@ -53,7 +53,7 @@
5353
<%= f.label(:language_id, _('Language'), class: 'form-label') %>
5454
<%= select_tag(:super_admin_user_language_id,
5555
options_from_collection_for_select(Language.sorted_by_abbreviation, "id", "name", lang_id),
56-
class: "form-control", name: 'user[language_id]') %>
56+
class: "form-select", name: 'user[language_id]') %>
5757
</div>
5858
<% end %>
5959

0 commit comments

Comments
 (0)