Skip to content

Add interstitial page for admin event registration creation#1272

Merged
maebeale merged 2 commits intomainfrom
maebeale/skip-admin-reg-email
Mar 1, 2026
Merged

Add interstitial page for admin event registration creation#1272
maebeale merged 2 commits intomainfrom
maebeale/skip-admin-reg-email

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Mar 1, 2026

What is the goal of this PR and why is this important?

  • When an admin creates an event registration, we no longer want to silently send emails
  • Instead, show an interstitial confirmation page where the admin can choose which follow-up actions to take
  • This gives admins control over whether to create a user account, send an invite, send a registration confirmation email, and/or send the admin FYI email

How did you approach the change?

  • Removed automatic email sending from EventRegistrationsController#create
  • Added confirm (GET) and process_confirm (POST) member routes on event_registrations
  • After a successful admin create, redirect to the new confirm interstitial page instead of the final destination
  • The interstitial shows a registration summary and contextual checkboxes:
    • Create user account — only shown when the Person has no User and has an email
    • Send system invite email — shown when no User (to be created) or existing unconfirmed User
    • Send registration confirmation email — shown when Person has an email
    • Send admin notification email — always shown
  • Created EventRegistrationServices::ProcessConfirmation service to handle the four optional actions
  • Non-admin users retain the existing direct redirect behavior (no interstitial)
  • Added admin-only confirm? and process_confirm? policy rules

UI Testing Checklist

  • As admin, create an event registration from the manage event page — verify redirect to interstitial
  • Verify checkboxes appear/hide based on Person's User account status
  • Submit with no checkboxes selected — verify "Registration created." flash and correct redirect
  • Submit with confirmation email checked — verify email is sent
  • Submit with create user + send invite checked — verify user created and invite sent
  • Click "Skip" — verify redirect without any actions
  • As regular user, create a registration — verify no interstitial (direct redirect)

Anything else to add?

  • The interstitial page follows existing admin page styling (admin-only bg-blue-100 background, white card)
  • The service follows the same patterns as UsersController for user creation and PublicRegistration for notification sending

🤖 Generated with Claude Code

maebeale and others added 2 commits March 1, 2026 05:29
When an admin creates an event registration, instead of silently
redirecting, show a confirmation page with optional follow-up actions:
create a user account, send a system invite, send the registration
confirmation email, and send the admin FYI email. Non-admin users
retain the existing direct redirect behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add confirm.html.erb to EXPECTED_MAPPINGS in page_bg_class alignment spec
- Force lazy let evaluation before expect blocks that assert User.count
  changes, preventing factory side effects from inflating the count

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maebeale maebeale merged commit 84474c0 into main Mar 1, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/skip-admin-reg-email branch March 1, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant