2021-03-01 13:42:26 -05:00
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="col-sm-9 col-md-7 col-lg-5 col-xl-4 ">
|
2020-09-12 20:07:02 -04:00
|
|
|
|
2021-03-03 08:15:14 -05:00
|
|
|
<h2>
|
2021-03-02 10:35:36 -05:00
|
|
|
<%= icon_div @conn, "bi-door-open", [class: "icon baseline"] %>
|
2021-03-01 13:42:26 -05:00
|
|
|
Log in
|
2021-03-03 08:15:14 -05:00
|
|
|
</h2>
|
2021-03-01 13:42:26 -05:00
|
|
|
<p class="lead">Who goes there?</p>
|
|
|
|
|
2021-03-01 16:29:19 -05:00
|
|
|
<%= form_for @conn, Routes.user_session_path(@conn, :create), [as: :user, class: "needs-validation", novalidate: true], fn f -> %>
|
2021-03-01 13:42:26 -05:00
|
|
|
<%= if @error_message do %>
|
|
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
|
|
<%= @error_message %>
|
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
2021-03-08 22:23:19 -05:00
|
|
|
|
2021-03-01 13:42:26 -05:00
|
|
|
<%= label f, :email, class: "form-label" %>
|
2021-03-08 22:23:19 -05:00
|
|
|
<div class="inner-addon left-addon mb-3">
|
|
|
|
<%= icon_div @conn, "bi-at", [class: "icon is-left text-muted fs-5"] %>
|
2021-03-01 13:42:26 -05:00
|
|
|
<%= email_input f, :email,
|
|
|
|
class: "form-control",
|
2021-03-01 16:29:19 -05:00
|
|
|
placeholder: "e.g., babka@73k.us",
|
|
|
|
maxlength: User.max_email,
|
|
|
|
required: true
|
|
|
|
%>
|
|
|
|
<span class="invalid-feedback">must be a valid email address</span>
|
2021-03-01 13:42:26 -05:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= label f, :password, class: "form-label" %>
|
2021-03-08 22:23:19 -05:00
|
|
|
<div class="inner-addon left-addon mb-3">
|
|
|
|
<%= icon_div @conn, "bi-lock", [class: "icon is-left text-muted fs-5"] %>
|
2021-03-01 13:42:26 -05:00
|
|
|
<%= password_input f, :password,
|
|
|
|
class: "form-control",
|
2021-03-01 16:29:19 -05:00
|
|
|
required: true
|
|
|
|
%>
|
|
|
|
<span class="invalid-feedback">password is required</span>
|
2020-09-12 20:07:02 -04:00
|
|
|
</div>
|
|
|
|
|
2021-03-08 22:23:19 -05:00
|
|
|
|
2021-03-03 08:15:14 -05:00
|
|
|
<div class="form-check mb-3 no-valid-style">
|
2021-03-01 13:42:26 -05:00
|
|
|
<%= checkbox f, :remember_me, class: "form-check-input" %>
|
|
|
|
<%= label f, :remember_me, "Keep me logged in for 60 days", class: "form-check-label" %>
|
|
|
|
</div>
|
2020-09-12 20:07:02 -04:00
|
|
|
|
2021-03-01 13:42:26 -05:00
|
|
|
<div class="mb-3">
|
|
|
|
<%= submit "Log in", class: "btn btn-primary" %>
|
|
|
|
</div>
|
2020-09-12 20:07:02 -04:00
|
|
|
|
2021-03-01 13:42:26 -05:00
|
|
|
<% end %>
|
2020-09-12 20:07:02 -04:00
|
|
|
|
2021-03-01 13:42:26 -05:00
|
|
|
<p>
|
|
|
|
<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
|
|
|
|
<%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %>
|
|
|
|
</p>
|
2020-09-12 20:07:02 -04:00
|
|
|
|
2021-03-01 13:42:26 -05:00
|
|
|
</div>
|
|
|
|
</div>
|