Codeminer42/cm42-central

View on GitHub
app/views/devise/passwords/edit.html.erb

Summary

Maintainability
Test Coverage
<% content_for :title_bar do %>
  <span class="navbar-brand"><%= t('.change_your_password') %></span>
<% end %>

<div class="row">
  <div class="col-sm-12 col-md-6 col-lg-4 col-md-offset-3 col-lg-offset-4">
    <div class="auth-wrapper">
      <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
        <%= render "devise/shared/error_messages", resource: resource %>
        <%= f.hidden_field :reset_password_token %>

        <div class="auth-form-group">
          <%= f.label :password, t('.new_password') %>
          <% if @minimum_password_length %>
            <em>(<%= @minimum_password_length %> characters minimum)</em><br />
          <% end %>
          <%= f.password_field :password, autofocus: true, autocomplete: "off", class: 'form-control auth-form-control' %>
        </div>

        <div class="auth-form-group">
          <%= f.label :password_confirmation, t('.confirm_new_password') %>
          <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control auth-form-control' %>
        </div>

        <div class="actions clearfix">
          <%= f.submit t('.confirm_new_password'), class: 'btn btn-primary pull-right auth-button-submit' %>
        </div>
      <% end %>
    </div>
  </div>

  <div class="col-sm-12 col-md-6 col-lg-4 col-md-offset-3 col-lg-offset-4">
    <%= render partial: "devise/shared/links" %>
  </div>
</div>