<% if @invitation %>

Join <%= @invitation.family.name %>!

You've been invited by <%= @invitation.invited_by.email %> to join their family. Create your account to accept the invitation and start sharing location data.

Your email (<%= @invitation.email %>) will be used for this account
<% else %>

Register now!

and take control over your location data.

<% end %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), class: 'form-body', html: { data: { turbo: session[:dawarich_client] == 'ios' ? false : true } }) do |f| %> <% if @invitation %> <%= f.hidden_field :invitation_token, value: params[:invitation_token] %> <% end %>
<%= f.label :email, class: 'label' do %> Email <% end %> <%= f.email_field :email, autofocus: true, autocomplete: "email", readonly: @invitation.present?, class: "input input-bordered #{@invitation ? 'input-disabled' : ''}" %>
<%= f.label :password, class: 'label' do %> Password <% end %> <% if @minimum_password_length %> (<%= @minimum_password_length %> characters minimum) <% end %>
<%= f.password_field :password, autocomplete: "new-password", class: 'input input-bordered' %>
<%= f.label :password_confirmation, class: 'label' do %> Password Confirmation <% end %> <% if @minimum_password_length %> (<%= @minimum_password_length %> characters minimum) <% end %>
<%= f.password_field :password_confirmation, autocomplete: "new-password", class: 'input input-bordered' %>
<% if !DawarichSettings.self_hosted? %>
<% end %>
<%= f.submit (@invitation ? "Create Account & Join Family" : "Sign up"), class: 'btn btn-primary' %>
<% unless @invitation %> <%= render "devise/shared/links" %> <% end %> <% end %>