<% content_for :title, "Sign a logbook entry" %>

Sign a logbook entry

You've been asked to sign the <%= fmt_date(@entry.date) %> <%= LogbookEntry::LOG_TYPES[@entry.log_type].downcase %> log entry for <%= @entry.aircraft.tail_number %>. First, sign in as <%= @invitation.email %>.

<%= link_to "I have an account: sign in", new_session_path, class: "btn-primary w-full justify-center" %>
<% if Sso.password_login? && !User.exists?(email_address: @invitation.email) %> <%= form_with url: account_invited_signing_path(params[:token]), class: "card card-body space-y-3" do %>

Or create an account

<% if @account_errors.present? %>
<%= @account_errors.to_sentence %>
<% end %>
<%= label_tag :name, "Your name", class: "label" %><%= text_field_tag :name, params[:name], class: "input", required: true %>
<%= label_tag :password, "Password", class: "label" %><%= password_field_tag :password, nil, class: "input", required: true, autocomplete: "new-password", minlength: User::PASSWORD_MIN, maxlength: 72 %>

At least <%= User::PASSWORD_MIN %> characters; not one known from a data breach.

<%= label_tag :password_confirmation, "Confirm password", class: "label" %><%= password_field_tag :password_confirmation, nil, class: "input", required: true, autocomplete: "new-password" %>
<%= submit_tag "Create account", class: "btn-secondary" %> <% end %> <% end %>