Current section

Files

Jump to
openmaize priv templates phoenixauth session_new.html.eex
Raw

priv/templates/phoenixauth/session_new.html.eex

<h2>Login</h2>
<%= form_for @conn, session_path(@conn, :create), [as: :session], 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, :username, "username", class: "control-label" %>
<%= text_input f, :username, class: "form-control" %>
<%= error_tag f, :username %>
</div>
<div class="form-group">
<%= label f, :password, class: "control-label" %>
<%= password_input f, :password, class: "form-control" %>
<%= error_tag f, :password %>
</div>
<div class="form-group">
<%= submit "Login", class: "btn btn-primary" %>
</div>
<% end %>
<%= link "Back", to: page_path(@conn, :index) %>