2 <div class="panel panel-default">
3 <div class="panel-heading">
4 <h4 class="panel-title">
8 <div class="panel-body">
10 <p>You can manage your profile using this page.
11 Any feilds in <font style="color:red">red</font> are required and missing.
12 Please fill in those fields before you can accesse Arvados Workbench.</p><br/>
15 <%= form_tag update_profile_path, {method: 'get', id: 'save_profile_form', name: 'save_profile_form', class: 'form-horizontal', remote: true} do %>
16 <% @profile_config.andand.each do |entry| %>
18 label = entry['required'] ? '* ' : ''
19 label += entry['form_field_title']
20 value = @current_user_profile[entry['key'].to_sym] if @current_user_profile
22 <div class="form-group">
23 <label for="<%=entry['key']%>"
24 class="col-sm-3 control-label"
25 style=<%="color:red" if entry['required']&&!value%>> <%=label%>
27 <% if entry['type'] == 'select' %>
28 <div class="col-sm-9">
29 <select class="form-control" id="<%=entry['key']%>" name="<%=entry['key']%>">
30 <% entry['options'].each do |option| %>
31 <option value="<%=option%>" <%='selected' if option==value%>><%=option%></option>
36 <div class="col-sm-9">
37 <input type="text" class="form-control" id="<%=entry['key']%>" name="<%=entry['key']%>" placeholder="<%=entry['form_field_description']%>" value="<%=value%>" ></input>
43 <div class="form-group">
44 <div class="col-sm-offset-2 col-sm-10">
45 <button type="submit" class="btn btn-primary">Save profile</button>