Skip to content

Commit 95fd174

Browse files
committed
Fix broken language select for trainer form
1 parent b0c5600 commit 95fd174

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

app/models/profile.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def check_public
9494
end
9595

9696
def reindex
97-
if Rails.env.production?
97+
if TeSS::Config.solr_enabled
9898
Trainer.reindex
9999
end
100100
end

app/views/users/_form.html.erb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@
5757
label: 'Training Experience', prompt: 'Select a level of experience...',
5858
input_html: { title: t('profile.hints.experience') } %>
5959

60-
<%= f.input :language, options: language_options_for_select,
61-
label: 'Languages Spoken', model_name: 'user[profile_attributes]', as: :select,
62-
input_html: { class: 'js-select2' },
60+
<%= f.dropdown :language, options: language_options_for_select,
61+
label: t('simple_form.labels.profile.language'), model_name: 'user[profile_attributes]', as: :select,
6362
errors: @user.profile.errors[:language], title: t('profile.hints.language') %>
6463

6564
<%= f.multi_input :expertise_academic, label: 'Academic expertise',

config/locales/en.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,3 +972,5 @@ en:
972972
visible: Show this material?
973973
user:
974974
check_broken_scrapers: Receive emails with scrapers that have not found anything last period.
975+
profile:
976+
language: Languages Spoken

0 commit comments

Comments
 (0)