mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 20:14:08 +00:00
* Initial pass at household invites * Invitee setup * Clean up add member form * Lint and other tweaks * Security cleanup * Lint * i18n fixes * More i18n cleanup * Show pending invites * Don't use turbo on the form * Improved email design * Basic tests * Lint * Update onboardings_controller.rb * Registration + invite cleanup * Lint * Update brakeman.ignore * Update brakeman.ignore * Self host invite links * Test tweaks * Address missing param error
36 lines
1.5 KiB
Plaintext
36 lines
1.5 KiB
Plaintext
<%
|
|
header_title @invitation ? t(".join_family_title", family: @invitation.family.name) : t(".title")
|
|
%>
|
|
|
|
<% if self_hosted_first_login? %>
|
|
<div class="fixed inset-0 w-full h-fit bg-gray-25 p-5 border-b border-alpha-black-200 flex flex-col gap-3 items-center text-center mb-12">
|
|
<h2 class="font-bold text-xl"><%= t(".welcome_title") %></h2>
|
|
<p class="text-gray-500 text-sm"><%= t(".welcome_body") %></p>
|
|
</div>
|
|
<% elsif @invitation %>
|
|
<div class="space-y-1 mb-6 text-center">
|
|
<p class="text-gray-500">
|
|
<%= t(".invitation_message",
|
|
inviter: @invitation.inviter.display_name,
|
|
role: t(".role_#{@invitation.role}")) %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= styled_form_with model: @user, url: registration_path, class: "space-y-4" do |form| %>
|
|
<%= form.email_field :email,
|
|
autofocus: false,
|
|
autocomplete: "email",
|
|
required: "required",
|
|
placeholder: "you@example.com",
|
|
label: true,
|
|
disabled: @invitation.present? %>
|
|
<%= form.password_field :password, autocomplete: "new-password", required: "required", label: true %>
|
|
<%= form.password_field :password_confirmation, autocomplete: "new-password", required: "required", label: true %>
|
|
<% if invite_code_required? && !@invitation %>
|
|
<%= form.text_field :invite_code, required: "required", label: true, value: params[:invite] %>
|
|
<% end %>
|
|
<%= form.hidden_field :invitation, value: @invitation&.token %>
|
|
<%= form.submit t(".submit") %>
|
|
<% end %>
|