Packages

A flexible authentication (and more) solution for Phoenix

Current section

Files

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

priv/templates/session/new.html.heex

<%%= form_for @changeset, <%= inspect web_module %>.Router.Helpers.haytni_<%= scope %>_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 Module.concat([web_module, :Haytni, camelized_scope, "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">
<%%= checkbox f, :remember, hidden_input: false %>
<%%= label f, :remember, Haytni.Gettext.dgettext("haytni", "Remember Me?") %>
</div>
<br/>
<%% end %>
<div class="form-group">
<%%= submit Haytni.Gettext.dgettext("haytni", "Sign In"), class: "btn btn-primary" %>
</div>
<%%= render <%= inspect Module.concat([web_module, :Haytni, camelized_scope, "SharedView"]) %>, "links.html", assigns %>
<%% end %>