- <div>
- <% profile_message = 'You can manage your profile using this page. Any feilds in red are required and missing.
- Please fill in those fields before you can accesse Arvados Workbench.'
- profile_config.kind_of?(Array) && profile_config.andand.each do |entry|
- if entry['message']
- profile_message = entry['message']
- break
- end
- end %>
- <p> <%=profile_message%> </p><br/>
- </div>
- <div>
- <%= form_tag update_profile_path, {method: 'put', id: 'save_profile_form', name: 'save_profile_form', class: 'form-horizontal', remote: true} do %>
+ <% if !missing_required_profile? && params[:offer_return_to] %>
+ <div class="alert alert-success">
+ <% if current_user.prefs[:getting_started_shown] %>
+ <p>Thank you for filling in your profile. <%= link_to 'Back to work!', params[:offer_return_to], class: 'btn btn-sm btn-primary' %></p>
+ <% else %>
+ <p>Thank you for filling in your profile. <%= link_to 'Get started', params[:offer_return_to], class: 'btn btn-sm btn-primary' %></p>
+ <% end %>
+ </div>
+ <% else %>
+ <div class="alert alert-info">
+ <p><%=raw(profile_message)%></p>
+ </div>
+ <% 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]) %>