<% profile_config = Rails.configuration.user_profile_form_fields current_user_profile = current_user.prefs[:profile] show_save_button = false profile_message = Rails.configuration.user_profile_form_message %>

Profile

<% if !missing_required_profile? && params[:offer_return_to] %>

Thank you for filling in your profile. <%= link_to 'Back to work!', params[:offer_return_to], class: 'btn btn-sm btn-primary' %>

<% else %>

<%=raw(profile_message)%>

<% end %> <%= form_for current_user, html: {id: 'save_profile_form', name: 'save_profile_form', class: 'form-horizontal'} do %> <%= hidden_field_tag :offer_return_to, params[:offer_return_to] %> <%= hidden_field_tag :return_to, profile_user_path(current_user.uuid, offer_return_to: params[:offer_return_to]) %>

<%=current_user.email%>

<%=current_user.first_name%>

<%=current_user.last_name%>

<%=current_user.andand.identity_url%>

<% profile_config.kind_of?(Array) && profile_config.andand.each do |entry| %> <% 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 %>
<% if entry['type'] == 'select' %>
<% else %>
<% end %>
<% end %> <% end %> <% if show_save_button %>
<% end %> <% end %>