Merge branch '8784-dir-listings'
[arvados.git] / apps / workbench / app / views / users / profile.html.erb
index 82a431c118bed74610d2a4d4a03f62da6a611799..26d1f57211b257a524461dd70f049a3e2afd9bf6 100644 (file)
@@ -1,3 +1,7 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 <%
     profile_config = Rails.configuration.user_profile_form_fields
     current_user_profile = current_user.prefs[:profile]
@@ -16,7 +20,7 @@
         <div class="panel-body">
           <% if !missing_required_profile? && params[:offer_return_to] %>
             <div class="alert alert-success">
-              <% if current_user.prefs['getting_started_shown'] %>
+              <% 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>
@@ -71,7 +75,7 @@
                     </label>
                     <% if entry['type'] == 'select' %>
                       <div class="col-sm-8">
-                        <select class="form-control" name="user[prefs][:profile][:<%=entry['key']%>]">
+                        <select class="form-control" name="user[prefs][profile][<%=entry['key']%>]">
                           <% entry['options'].each do |option| %>
                             <option value="<%=option%>" <%='selected' if option==value%>><%=option%></option>
                           <% end %>
@@ -79,7 +83,7 @@
                       </div>
                     <% else %>
                       <div class="col-sm-8">
-                        <input type="text" class="form-control" name="user[prefs][:profile][:<%=entry['key']%>]" placeholder="<%=entry['form_field_description']%>" value="<%=value%>" ></input>
+                        <input type="text" class="form-control" name="user[prefs][profile][<%=entry['key']%>]" placeholder="<%=entry['form_field_description']%>" value="<%=value%>" ></input>
                       </div>
                     <% end %>
                   </div>
@@ -88,8 +92,8 @@
 
               <%# If the user has other prefs, we need to preserve them %>
               <% current_user.prefs.each do |key, value| %>
-                <% if key != 'profile' %>
-                  <input type="hidden" name="user[prefs][:<%=key%>]" value="<%=value.to_json%>">
+                <% if key != :profile %>
+                  <input type="hidden" name="user[prefs][<%=key%>]" value="<%=value.to_json%>">
                 <% end %>
               <% end %>