<h2>Reset password</h2>

<%= form_for @conn, password_reset_path(@conn, :create), [as: :password_reset], fn f -> %>
  <%= if f.errors != [] do %>
    <div class="alert alert-danger">
      <p>Please check the errors below:</p>
    </div>
  <% end %>

  <div class="form-group">
    <%= label f, :email, "email", class: "control-label" %>
    <%= text_input f, :email, class: "form-control" %>
    <%= error_tag f, :email %>
  </div>

  <div class="form-group">
    <%= submit "Reset password", class: "btn btn-primary" %>
  </div>
<% end %>

<%= link "Back", to: page_path(@conn, :index) %>
