- <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.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 && params.andand.keys.include?('target') %>
+ <div class="rounded" style="border-width: 1px; border-style: dotted; border-color: lightgray;">
+ <p style="margin: 8px;">Thank you for filling in your profile. If you are done updating your profile,
+ you can now access Arvados Workbench by clicking on this button.
+ <form action="<%=target%>">
+ <input style="margin-left: 8px;" class="btn btn-primary" type="submit" value="Access Arvados Workbench">
+ </form>
+ </p>
+ </div>
+ <% else %>
+ <div class="rounded" style="border-width: 1px; border-style: dotted; border-color: lightgray;">
+ <p style="margin: 8px;"> <%=raw(profile_message)%> </p>
+ </div>
+ <% end %>
+
+ <div class="rounded" style="border-width: 1px; border-style: dotted; border-color: lightgray;">
+ <%= form_tag "/users/#{current_user.uuid}", {method: 'patch', id: 'save_profile_form', name: 'save_profile_form', class: 'form-horizontal'} do %>
+ <%= hidden_field_tag :return_to, return_to_url %>