X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/16f704326f44fd1e5e5e60b936c9b5895d6a6ff8..a93774da6449567a2759672cf329be6ec96f91e3:/apps/workbench/app/views/users/profile.html.erb diff --git a/apps/workbench/app/views/users/profile.html.erb b/apps/workbench/app/views/users/profile.html.erb index 26d1f57211..6692196dab 100644 --- a/apps/workbench/app/views/users/profile.html.erb +++ b/apps/workbench/app/views/users/profile.html.erb @@ -3,11 +3,18 @@ SPDX-License-Identifier: AGPL-3.0 %> <% - profile_config = Rails.configuration.user_profile_form_fields + profile_config = [] + Rails.configuration.Workbench.UserProfileFormFields.each do |k, v| + r = v.dup + r["Key"] = k + profile_config << r + end + profile_config.sort_by! { |v| v["Position"] } + current_user_profile = current_user.prefs[:profile] show_save_button = false - profile_message = Rails.configuration.user_profile_form_message + profile_message = Rails.configuration.Workbench.UserProfileFormMessage %>
@@ -61,29 +68,29 @@ SPDX-License-Identifier: AGPL-3.0 %>
<% profile_config.kind_of?(Array) && profile_config.andand.each do |entry| %> - <% if entry['key'] %> + <% if entry['Key'] %> <% show_save_button = true - label = entry['required'] ? '* ' : '' - label += entry['form_field_title'] - value = current_user_profile[entry['key'].to_sym] if current_user_profile + label = entry['Required'] ? '* ' : '' + label += entry['FormFieldTitle'] + value = current_user_profile[entry['Key'].to_sym] if current_user_profile %>
- - <% if entry['type'] == 'select' %> + <% if entry['Type'] == 'select' %>
- + <% entry['Options'].each do |option, _| %> <% end %>
<% else %>
- +
<% end %>