Skip to content

HOLD UNTIL REQUESTED: Let admins register attendees without sending them a confirmation email#1626

Open
maebeale wants to merge 4 commits into
mainfrom
maebeale/admin-create-registration
Open

HOLD UNTIL REQUESTED: Let admins register attendees without sending them a confirmation email#1626
maebeale wants to merge 4 commits into
mainfrom
maebeale/admin-create-registration

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

Closes [link an issue or remove this line]

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

  • Staff frequently register people on their behalf, where the automatic "you're registered" email to the attendee is unwanted noise (and sometimes goes to someone who never asked to be emailed).
  • This adds an admin-only "on behalf" mode to the public registration form that captures the full registration but suppresses the registrant-facing confirmation — while still sending the staff FYI notification.

How did you approach the change?

  • PublicRegistration gained a send_confirmation: flag; the controller only honors on_behalf for users who can manage the event, finds/creates the registrant from the form (not the admin), and keeps the admin FYI.
  • Because the on-behalf attendee isn't logged in, the form now renders the full logged-out field set for admins and reveals the identity fields it normally hides for a logged-in user via a small on-behalf Stimulus controller, with "Register on behalf" entry points on the registrants roster and the event Form actions menu.

UI Testing Checklist

  • As an admin, open an event's registrants page and click "Register on behalf" — the toggle is pre-checked and the name/email identity fields are visible.
  • Submitting in on-behalf mode creates the registration but sends no confirmation email to the attendee (staff FYI still arrives).
  • Unchecking "Registering on someone's behalf" re-hides the identity fields; re-checking reveals them.
  • As a logged-out visitor, the on-behalf toggle is not present and registration still emails a confirmation.

Anything else to add?

  • The existing admin "New registration" → confirm-page flow (opt-in email) is unchanged; this complements it for the full-form case. Covered by new request and service specs.

@maebeale maebeale marked this pull request as ready for review June 11, 2026 14:00

# An admin (or event owner) registering someone else: only honored for users
# who can manage the event, so a guest can't suppress their own confirmation.
def on_behalf?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Gated on allowed_to?(:dashboard?, @event) so a logged-out visitor can never set on_behalf to suppress their own confirmation — the flag is ignored unless the requester can manage the event.

# logged-out form so they can register a not-logged-in person; the fields
# that are normally hidden for the logged-in admin are flagged as
# "behalf-only" and revealed client-side when "on behalf" is checked.
def set_field_variables

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Admins always get the full logged-out field set because the person being registered isn't logged in. The diff against the logged-in set (@behalf_only_field_ids) is what the Stimulus controller reveals/hides as the toggle changes.

@maebeale maebeale force-pushed the maebeale/admin-create-registration branch from 791e990 to 048bf8f Compare June 11, 2026 14:05
@maebeale maebeale requested a review from jmilljr24 June 11, 2026 14:18
@maebeale

Copy link
Copy Markdown
Collaborator Author

@jmilljr24 this offers an alternative to as_visitor. i reuse this controller in subsequent pr to offer a similar option for the bulk payment form. lmk what you think!

@maebeale maebeale changed the title Let admins register attendees without sending them a confirmation email HOLD UNTIL REQUESTED: Let admins register attendees without sending them a confirmation email Jun 12, 2026
@maebeale maebeale force-pushed the maebeale/admin-create-registration branch from 4a9821c to fab69c0 Compare June 13, 2026 00:22
maebeale and others added 4 commits June 13, 2026 07:19
Staff often register people on their behalf, where a "thanks for
registering" email to the attendee is unwanted noise. Adds an admin-only
"on behalf" mode to the public registration form that suppresses the
registrant confirmation while still sending the staff FYI, and reveals
the identity fields the form normally hides for a logged-in user (the
attendee isn't logged in, so those fields must be filled in).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The param was never read by Events::PublicRegistrationsController, so it
had no effect on the rendered form — removing the noise.
Admins should see the on-behalf option before reading the form
instructions, so move it to the top of the form (above forms/header).
@maebeale maebeale force-pushed the maebeale/admin-create-registration branch from fab69c0 to 4be561a Compare June 13, 2026 11:20
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