<%= if @has_email_code? do %> <%= form_for @conn, "/activate", [class: "w-full max-w-lg mx-auto bg-white dark:bg-gray-800 shadow-md rounded px-8 py-6 mb-4 mt-8"], fn f -> %>

<%= if @has_any_memberships? do %> Verify your email address <% else %> Activate your account <% end %>

Please enter the 4-digit code we sent to <%= @conn.assigns[:current_user].email %>
<%= text_input(f, :code, class: "tracking-widest font-medium shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-36 px-8 border-gray-300 dark:border-gray-500 rounded-l-md dark:text-gray-200 dark:bg-gray-900", oninput: "this.value=this.value.replace(/[^0-9]/g, ''); if (this.value.length >= 4) document.getElementById('submit').focus()", onclick: "this.select();", maxlength: "4", placeholder: "••••", style: "letter-spacing: 10px;", required: "required" ) %>
Activate →
<%= error_tag(assigns, :error) %>
Didn't receive an email?
  1. Check your spam folder
  2. <%= link("Send a new code", class: "underline text-indigo-600", to: "/activate/request-code", method: :post ) %> to <%= @conn.assigns[:current_user].email %>
  3. <%= if full_build?() do %>
  4. Contact us if the problem persists
  5. <% else %>
  6. Ask on our <%= link("community-supported forum", to: "https://github.com/plausible/analytics/discussions", class: "text-indigo-600 underline" ) %>
  7. <% end %>
Entered the wrong email address?
<% end %> <% else %>

Activate your account

A 4-digit activation code will be sent to <%= @conn.assigns[:current_user].email %>
<%= error_tag(assigns, :error) %> <%= button("Request activation code", to: "/activate/request-code", method: :post, class: "button mt-12" ) %>
<% end %> <%= if !@has_any_invitations? and !@has_any_memberships? do %> <% end %>