3296: add comments to applicaiton.defaults.yml describing the user_profile_form_field...
authorradhika <radhika@curoverse.com>
Tue, 5 Aug 2014 14:07:38 +0000 (10:07 -0400)
committerradhika <radhika@curoverse.com>
Tue, 5 Aug 2014 14:07:38 +0000 (10:07 -0400)
apps/workbench/app/views/users/_profile.html.erb
apps/workbench/config/application.default.yml

index 47bb9b1546894267447dbb9f2dbc34229a31e136..33e02925dd3082e00f916a7764120d4d916d2c7a 100644 (file)
@@ -6,6 +6,11 @@
           </h4>
         </div>
         <div class="panel-body">
+          <div>
+            <p>You can manage your profile using this page. 
+               Any feilds in <font style="color:red">red</font> are required and missing. 
+               Please fill in those fields before you can accesse Arvados Workbench.</p><br/>
+          </div>
           <div>
             <%= form_tag update_profile_path, {method: 'get', id: 'save_profile_form', name: 'save_profile_form', class: 'form-horizontal', remote: true} do %>
             <% @profile_config.andand.each do |entry| %>
               %>
                 <div class="form-group">
                   <label for="<%=entry['key']%>"
-                         class="col-sm-2 control-label"
+                         class="col-sm-3 control-label"
                          style=<%="color:red" if entry['required']&&!value%>> <%=label%>
                   </label>
                   <% if entry['type'] == 'select' %>
-                    <div class="col-sm-10">
+                    <div class="col-sm-9">
                       <select class="form-control" id="<%=entry['key']%>" name="<%=entry['key']%>">
                         <% entry['options'].each do |option| %>
                           <option value="<%=option%>" <%='selected' if option==value%>><%=option%></option>
@@ -28,7 +33,7 @@
                       </select>
                     </div>
                   <% else %>
-                    <div class="col-sm-10">
+                    <div class="col-sm-9">
                       <input type="text" class="form-control" id="<%=entry['key']%>" name="<%=entry['key']%>" placeholder="<%=entry['form_field_description']%>" value="<%=value%>" ></input>
                     </div>
                   <% end %>
@@ -37,7 +42,7 @@
 
                 <div class="form-group">
                   <div class="col-sm-offset-2 col-sm-10">
-                    <button type="submit" class="btn btn-default">Save profile</button>
+                    <button type="submit" class="btn btn-primary">Save profile</button>
                   </div>
                 </div>
 
index eea16c09a6a1f3b56b26bc21835d0dffb89cc2db..5c6d6f1377045647a0526cc6e1a3d5d670fa6d52 100644 (file)
@@ -75,4 +75,31 @@ common:
   default_openid_prefix: https://www.google.com/accounts/o8/id
   send_user_setup_notification_email: true
 
+  # Set user_profile_form_fields to enable and configure the user profile page.
+  # A commented setting with full description is provided below.
   user_profile_form_fields: false
+
+  # Below is a sample setting of user_profile_form_fields.
+  # This sample configures two fields as represented by the attribute "key".
+  # You can specify "type" as "text" or "select".
+  # Specify "options" when using the type "select".
+  # Set "required" as "true" for any of the fields to make them required. 
+  # If any of the required fields are missing in the user's profile, the user will be
+  # redirected to the "/profile" page before they can access any Workbench features.
+  #user_profile_form_fields:
+  #  - key: organization
+  #    type: text
+  #    form_field_title: Institution/Company
+  #    form_field_description: Your organization
+  #    required: true
+  #  - key: role
+  #    type: select
+  #    form_field_title: Your role
+  #    form_field_description: Choose the category that best describes your role in your lab.
+  #    options:
+  #      - Bio-informatician
+  #      - Computational biologist
+  #      - Biologist or geneticist
+  #      - Software developer
+  #      - IT
+  #      - Other