<% if @invitation %>

Sign in to join <%= @invitation.family.name %>!

You've been invited by <%= @invitation.invited_by.email %> to join their family. Sign in to your account to accept the invitation.

Don't have an account yet? <%= link_to "Create one here", new_user_registration_path(invitation_token: @invitation.token), class: "font-semibold underline" %>

<% else %>

Login now

and take control over your location data.

<% end %>
<%= form_for(resource, as: resource_name, url: session_path(resource_name), class: 'form-body', html: { data: { turbo: session[:dawarich_client] == 'ios' ? false : true } }) do |f| %> <% if @invitation %> <%= hidden_field_tag :invitation_token, params[:invitation_token] %> <% end %>
<%= f.label :email, class: 'label' do %> Email <% end %> <%= f.email_field :email, autofocus: true, autocomplete: "email", class: 'input input-bordered' %>
<%= f.label :password, class: 'label' do %> Password <% end %> <%= f.password_field :password, autocomplete: "current-password", class: 'input input-bordered' %> <% if devise_mapping.rememberable? %>
<% end %>
<%= f.submit (@invitation ? "Sign in & Accept Invitation" : "Log in"), class: 'btn btn-primary' %>
<% unless @invitation %> <%= render "devise/shared/links" %> <% end %> <% end %>