summaryrefslogtreecommitdiff
path: root/lib/aggiedit_web/templates/user_session/new.html.heex
blob: 46287e37c3d5ea86d194b958f4d82532db0cbb67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<h1>Log in</h1>

<.form let={f} for={@conn} action={Routes.user_session_path(@conn, :create)} as={:user}>
  <%= if @error_message do %>
    <div class="alert alert-danger">
      <p><%= @error_message %></p>
    </div>
  <% end %>

  <div class="form-group">
    <%= label f, :email %>
    <%= email_input f, :email, required: true, class: "form-control" %>
  </div>
  <div class="form-group mt-2">
    <%= label f, :password %>
    <%= password_input f, :password, required: true, class: "form-control" %>
  </div>
  <div class="form-check mt-2">
    <%= label f, :remember_me, "Keep me logged in for 60 days" %>
    <%= checkbox f, :remember_me, class: "form-check-input" %>
  </div>
  <div class="mt-2">
    <%= submit "Log in", class: "btn btn-primary" %>
  </div>
</.form>

<hr>

<p>
  <%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
  <%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %>
</p>