<% 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 %>

Almost there!

<% end %>

Only a few steps left until you get control over your location data!

  1. 1. Create your account
  2. 2. Configure your mobile app
  3. 3. Start tracking your location data securely
  4. 4. ...
  5. 5. You're beautiful!
<%= 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| %> <%= render "devise/shared/error_messages", resource: resource %> <% 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 w-full #{@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 w-full' %>
<%= 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 w-full' %>
<% if !DawarichSettings.self_hosted? %>
<% end %>
<%= f.submit (@invitation ? "Create Account & Join Family" : "Sign up"), class: 'btn btn-primary' %>
<% end %> <% unless @invitation %> <%= render "devise/shared/links" %> <% end %>