planner/lib/planner_web/templates/user_session/new.html.eex

40 lines
1,004 B
Elixir

<h1 class="title is-1">Login</h1>
<%= form_for @conn, Routes.user_session_path(@conn, :create), [as: :user], fn f -> %>
<%= if @error_message do %>
<div class="help is-danger">
<p><%= @error_message %></p>
</div>
<% end %>
<div class="field">
<%= label f, :email, class: "label" %>
<div class="control">
<%= text_input f, :email, required: true, class: "input" %>
</div>
</div>
<div class="field">
<%= label f, :password, class: "label" %>
<div class="control">
<%= password_input f, :password, required: true, class: "input" %>
</div>
</div>
<div class="field">
<div class="control">
<%= label class: "checkbox" do %>
Keep me logged in for 60 days
<%= checkbox f, :remember_me %>
<% end %>
</div>
</div>
<div class="control">
<%= submit "Login", class: "button is-link" %>
</div>
<% end %>
<p>
<%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %>
</p>