expertiza/expertiza

View on GitHub
app/views/profile/edit.html.erb

Summary

Maintainability
Test Coverage
<h1><%=t ".user_profile_info"%></h1>

<br/>

<%= form_for @user, url: profile_index_path, method: :patch do |f| %>
<table class="table borderless table-not-full-width">
  <%= render :partial => 'users/name' %>
  <%= render :partial => 'users/password' %>
  <tr><td><i><font size=-2><%=t ".password_msg"%></font></i></td><td></td></tr>
  <%= render :partial => 'users/email' %>
  <%= render :partial => 'users/institutions' %>
  <%= render :partial => 'users/prefs' %>
  <p><strong><%=t ".action_pref"%></strong></p>
  <%# Create 2 radio button for user to select if show action button on their assignment home page%>
  <%= radio_button_tag(:no_show_action, 'not_show_actions',checked = @user.etc_icons_on_homepage ? false : true) %>
  <%= label_tag(:no_show_action, t(".homepage_cant")) %>
  <%= radio_button_tag(:no_show_action, 'show_actions', checked = @user.etc_icons_on_homepage) %>
  <%= label_tag(:no_show_action, t(".homepage_can")) %>
  <%= render :partial => 'handle' %>
  <% if @user.role.parent_id != nil %>
    <%= render :partial => 'limit' %>
  <% end %>
  <p class="form-inline"><label class="width-266"><%=t ".preferred_time_zone"%>: </label>
    <%= time_zone_select("user", "timezonepref", ActiveSupport::TimeZone.all,{}, {:class => 'form-control width-250'})%></p>
  <p class="form-inline"><label class="width-266">Preferred Language: </label>
    <%= f.select :locale, Locale.tabulate(Locale.available_locale_preferences, [:display_name, :code_name]),
                 { :selected => @user.locale }, { :class => 'form-control width-250' } %>
  </p>

  <%= f.submit t(".save"), class: "btn btn-default btn-md" %>
</table>
<% end %>