Skip to content

Commit

Permalink
Merge pull request #1037 from sparc-request/os#147708807-subspecialty
Browse files Browse the repository at this point in the history
SAW - changed subspecialties constant call to query
  • Loading branch information
SamWord committed Jul 31, 2017
2 parents d26b8b5 + 0e2da01 commit 176f086
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/reports/apr_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def run
row << (INSTITUTIONS.detect {|k,v| v == pi.institution}[0] rescue pi.institution)
row << (COLLEGES.detect {|k,v| v == pi.college}[0] rescue pi.college)
row << (DEPARTMENTS.detect {|k,v| v == pi.department}[0] rescue pi.department)
row << (SUBSPECIALTIES.detect {|k,v| v == pi.subspecialty}[0] rescue pi.subspecialty)
row << (PermissibleValue.get_inverted_hash('subspecialty').detect {|k,v| v == pi.subspecialty}[0] rescue pi.subspecialty)
else
7.times do
row << ''
Expand Down
2 changes: 1 addition & 1 deletion app/views/associated_users/_user_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
= identity_form.text_field :phone, class: 'form-control'

= user_form_group(name: :subspecialty, classes: ['role_dependent subspecialty', ['pi', 'primary-pi'].include?(form.object.role) ? '' : 'hidden'], form: identity_form) do
= identity_form.select :subspecialty, options_for_select((SUBSPECIALTIES.sort), identity.subspecialty), { include_blank: t(:authorized_users)[:form_fields][:subspecialty_prompt] }, class: 'form-control selectpicker'
= identity_form.select :subspecialty, options_for_select((PermissibleValue.get_inverted_hash('subspecialty').sort), identity.subspecialty), { include_blank: t(:authorized_users)[:form_fields][:subspecialty_prompt] }, class: 'form-control selectpicker'

= user_form_group(name: :role, form: form, required: true) do
= form.select :role, options_for_select(PermissibleValue.get_inverted_hash('user_role'), form.object.role), { include_blank: t(:authorized_users)[:form_fields][:role_prompt] }, class: 'form-control selectpicker'
Expand Down

0 comments on commit 176f086

Please sign in to comment.