AlchemyCMS/alchemy-devise

View on GitHub
app/views/alchemy/admin/passwords/new.html.erb

Summary

Maintainability
Test Coverage
<%= content_for :stylesheets do %>
  <%= stylesheet_link_tag "alchemy-devise" %>
<% end %>

<div class="login_signup_box">
  <%= image_tag 'alchemy/alchemy-logo.svg', id: 'logo' %>
<% if @user.errors.blank? %>
  <%= render_message do %>
    <h1><%= Alchemy.t('Password reset') %></h1>
    <p><%= Alchemy.t('Please enter your email address') %></p>
  <% end %>
<% else %>
  <div id="errors" style="display: block">
    <%= devise_error_messages! %>
  </div>
<% end %>
  <%= alchemy_form_for :user, url: admin_reset_password_path, html: {method: 'post'} do |f| %>
    <%= f.input :email,
      autofocus: true,
      input_html: {value: params[:email]} %>
    <div class="input link">
      <small>
        <%= link_to Alchemy.t(:back), alchemy.admin_login_path %>
      </small>
    </div>
    <%= f.submit Alchemy.t("Send reset instructions"), input_html: {class: 'secondary'} %>
  <% end %>
</div>