Register

Create an account to manage your work shifts with us.

<%= form_for @changeset, "#", [phx_change: :validate, phx_submit: :save, novalidate: true, id: "reg_form"], fn f -> %> <%= label f, :email, class: "form-label" %>
<%= email_input f, :email, value: input_value(f, :email), class: input_class(f, :email, "form-control"), placeholder: "e.g., babka@73k.us", maxlength: User.max_email, autofocus: true, phx_debounce: "blur", aria_describedby: error_ids(f, :email) %> <%= error_tag f, :email %>
<%= label f, :password, class: "form-label" %>
<%= password_input f, :password, value: input_value(f, :password), class: input_class(f, :password, "form-control"), maxlength: User.max_password, phx_debounce: "250", aria_describedby: error_ids(f, :password) %> <%= error_tag f, :password %>
<%= submit (@trigger_submit && "Saving..." || "Register"), class: "btn btn-primary", disabled: @trigger_submit || !@changeset.valid?, aria_disabled: (@trigger_submit || !@changeset.valid?) && "true" || false, phx_disable_with: "Saving..." %>
<% end %>

<%= link "Log in", to: Routes.user_session_path(@socket, :new) %> | <%= link "Forgot your password?", to: Routes.user_reset_password_path(@socket, :new) %>

<%# hidden form for initial login after registration %> <%= form_for :user, Routes.user_session_path(@socket, :create), [phx_trigger_action: @trigger_submit, id: "reg_trigger"], fn f -> %> <%= hidden_input f, :params_token, value: Phoenix.Token.encrypt(Shift73kWeb.Endpoint, "login_params", @login_params) %> <% end %>