Packages

A flexible authentication (and more) solution for Phoenix

Current section

Files

Jump to
haytni priv templates session new.html.eex
Raw

priv/templates/session/new.html.eex

<%%= form_for @changeset, <%= inspect web_module %>.Router.Helpers.session_path(@conn, :create), [as: :session], fn f -> %>
<% if false do %>
<%%= if Haytni.plugin_enabled?(@module, Haytni.LockablePlugin) && Haytni.LockablePlugin.last_attempt?(TODO) do %>
<p><%%= Haytni.Gettext.dgettext("haytni", "Warning: at the next failed attempt, the account will be locked") %></p>
<%% end %>
<% end %>
<%%= if f.errors[:base] do %>
<p><%%= elem(f.errors[:base], 0) %></p>
<%% end %>
<%%= render <%= inspect web_module %>.Haytni.SharedView, "keys.html", changeset: @changeset, f: f, keys: @config.authentication_keys %>
<div class="form-group">
<%%= label f, :password, Haytni.Gettext.dgettext("haytni", "Password"), class: "control-label" %>
<%%= password_input f, :password, class: "form-control", required: "" %>
<%%= error_tag f, :password %>
</div>
<%%= if Haytni.plugin_enabled?(@module, Haytni.RememberablePlugin) do %>
<div class="form-group">
<input type="checkbox" name="remember" id="remember">
<label for="remember"><%%= Haytni.Gettext.dgettext("haytni", "Remember Me?") %></label>
</div>
<br/>
<%% end %>
<div class="form-group">
<%%= submit Haytni.Gettext.dgettext("haytni", "Sign In"), class: "btn btn-primary" %>
</div>
<%%= render <%= inspect web_module %>.Haytni.SharedView, "links.html", assigns %>
<%% end %>