← back to Ventura Claw Leads
views/public/claim-complete.ejs
34 lines
<%- include('../partials/head', { title }) %>
<%- include('../partials/header') %>
<section class="long-form">
<% if (!ok) { %>
<p class="kicker">Link not valid</p>
<h1 class="display-sm">This claim link can't be used.</h1>
<p class="lede"><%
if (reason === 'expired') { %>The 24-hour window expired.<%
} else if (reason === 'already_used') { %>This link was already used to claim a listing — sign in below.<%
} else { %>The link is malformed or doesn't match a current claim.<%
} %></p>
<p style="margin-top:24px"><a href="/admin/login" class="btn btn-primary">Sign in</a> <a href="/find" class="btn btn-ghost">Browse the directory</a></p>
<% } else { %>
<p class="kicker">Claim · <%= business.business_name %></p>
<h1 class="display-sm">Set a password to take ownership.</h1>
<p class="lede">Welcome — once you set a password, you'll be signed in and dropped on your dashboard. You'll receive new leads at <strong><%= email %></strong>.</p>
<% if (error) { %>
<p class="callout" style="background:#fee2e2;border-left:3px solid #dc2626;padding:12px 16px;margin:16px 0;border-radius:4px"><%= error %></p>
<% } %>
<form method="post" action="/claim/<%= encodeURIComponent(token) %>" style="margin-top:24px;max-width:420px">
<input type="hidden" name="_csrf" value="<%= csrfToken %>">
<label>Email<input type="email" value="<%= email %>" disabled style="background:var(--bg-alt);color:var(--fg-muted)"></label>
<label>Password (10+ characters)<input type="password" name="password" required minlength="10" autocomplete="new-password"></label>
<label>Confirm password<input type="password" name="password_confirm" required minlength="10" autocomplete="new-password"></label>
<button type="submit" class="btn btn-primary btn-lg" style="margin-top:8px">Claim <%= business.business_name %> →</button>
</form>
<% } %>
</section>
<%- include('../partials/footer') %>