+ Hello <%= @submission.bulk_payment_payer_name %>, +
+ + <%# Editable intro the admin sets on the bulk-reminder page. In preview mode the + container always renders (hidden when empty) with the hooks the + reminder-preview Stimulus controller fills in live; a real send only renders + it when a message is present. Mirrors event_registration_reminder. %> + <% if @custom_message.present? || @preview %> + <%= content_tag :div, + reminder_message_html(@custom_message), + id: ("reminder-custom-message" if @preview), + data: ({ reminder_preview_target: "message" } if @preview), + style: "margin: 8px 0; font-size: 14px; line-height: 1.5;#{' display: none;' if @preview && @custom_message.blank?}" %> + <% end %> + ++ You submitted a "Pay for Others" form for + <%= pluralize(@attendee_count, "attendee") %><%= " for #{@event.title}" if @event %>. + Some of them still need to complete their registration or payment. +
+ + <% if @event %> + <%= render "event_details_card", event: @event, time_zone: @time_zone %> + <% end %> ++ Review who you're paying for and your total, and finish any outstanding payment: +
+ ++ View payment +
+<% end %> + ++ This is an automated reminder from <%= @organization_name %>. +
diff --git a/app/views/event_mailer/event_bulk_payment_reminder.text.erb b/app/views/event_mailer/event_bulk_payment_reminder.text.erb new file mode 100644 index 0000000000..a3ff0ecad1 --- /dev/null +++ b/app/views/event_mailer/event_bulk_payment_reminder.text.erb @@ -0,0 +1,25 @@ +Payment reminder + +Hello <%= @submission.bulk_payment_payer_name %>, + +<% if @custom_message.present? %> +<%= strip_tags(@custom_message).strip %> + +<% end %>You submitted a "Pay for Others" form for <%= pluralize(@attendee_count, "attendee") %><%= " for #{@event.title}" if @event %>. Some of them still need to complete their registration or payment. + +<% if @event %><% if @event.respond_to?(:pre_title) && @event.pre_title.present? %> +<%= @event.pre_title %> +<% end %><%= @event.title %> +<% Time.use_zone(@time_zone) do %><% if event_dates_detail_label(@event.object).present? %><%= event_dates_detail_label(@event.object) %> +<% end %><% if event_times_label(@event.object).present? %><%= event_times_label(@event.object) %> +<% end %><% end %> +<% if event_location_label(@event.object).present? %> +Location: <%= event_location_label(@event.object) %> +<% end %> +<% end %><% if @ticket_url %> +Review who you're paying for and your total, and finish any outstanding payment: +<%= @ticket_url %> +<% end %> + +-- +This is an automated reminder from <%= @organization_name %>. diff --git a/app/views/event_mailer/event_registration_reminder_fyi.html.erb b/app/views/event_mailer/event_registration_reminder_fyi.html.erb index 5c60ad1be5..b1e30c8ba8 100644 --- a/app/views/event_mailer/event_registration_reminder_fyi.html.erb +++ b/app/views/event_mailer/event_registration_reminder_fyi.html.erb @@ -2,7 +2,7 @@- A reminder email was sent to <%= @recipient_labels.size %> registrant<%= "s" if @recipient_labels.size != 1 %> for <%= @event.title %>. + A reminder email was sent to <%= @recipient_labels.size %> recipient<%= "s" if @recipient_labels.size != 1 %> for <%= @event.title %>.
<% if @recipient_labels.any? %> @@ -17,7 +17,7 @@- Reminder content sent to each registrant: + Reminder content sent to each recipient:
- Each registrant also received a personalized "View ticket" link. + Each recipient also received a personalized link to their ticket or payment.
+ People who submitted a "Pay for Others" form but still have attendees who + aren't registered yet, or whose registration hasn't been paid in full. + Remind them to follow up. They're a separate group — the filters above don't + change this list. +
+ +| + + | +Payer | +Outstanding | +Bulk payment | +
|---|---|---|---|
| + <%= check_box_tag "form_submission_ids[]", submission.id, true, class: "submitter-checkbox rounded border-gray-300", id: "form_submission_ids_#{submission.id}" %> + | ++ <%= recipient.payer_name %> + (<%= recipient.email %>) + | ++ <% if recipient.unregistered_count.positive? %> + + + <%= recipient.unregistered_count %> not registered + + <% end %> + <% if recipient.unpaid_count.positive? %> + + + <%= recipient.unpaid_count %> unpaid + + <% end %> + of <%= pluralize(recipient.attendee_count, "attendee") %> + | ++ <%# Opens the payer's card on the bulk payments dashboard in a new + tab so the in-progress draft on this page isn't lost. %> + <%= link_to bulk_payments_event_path(@event, expand: submission.id, anchor: "payment-card-#{submission.id}"), + title: "View #{recipient.payer_name}'s bulk payment (opens in a new tab)", + target: "_blank", rel: "noopener", + class: "inline-flex items-center shrink-0 rounded-lg border border-gray-300 bg-white px-3 py-2 text-gray-600 shadow-sm hover:bg-gray-50 hover:text-gray-800 transition-colors" do %> + + <% end %> + | +
You're about to email <%= count %> registrant<%= "s" if count != 1 %>.
+You're about to email <%= count %> recipient<%= "s" if count != 1 %>.
Review the recipients and the message below, then send. Each person receives their own copy, and one FYI email will be sent to the admin.
- <%= @event_registrations.map { |reg| reg.registrant.full_name }.join(", ") %> -
++ <%= @event_registrations.map { |reg| reg.registrant.full_name }.join(", ") %> +
-- <%= @event_registrations.map { |reg| reg.registrant.preferred_email }.join(", ") %> -
++ <%= @event_registrations.map { |reg| reg.registrant.preferred_email }.join(", ") %> +
-Subject
-<%= @reminder_subject %>
+ <% if submitter_count.positive? %> +Registrant email — subject
+<%= @reminder_subject %>
+Pay for Others email — subject
+<%= @submitter_reminder_subject %>
+There are no registrants with an email address to send a reminder to.
+ <% if @event_registrations.empty? && @bulk_payment_recipients.empty? %> +There are no registrants or Pay for Others submitters with an email address to send a reminder to.
<%= link_to "Back to registrants", registrants_event_path(@event), class: "btn btn-secondary-outline" %> <% else %>
- Choose who will receive this reminder. Filters keep everyone in the list and
- check the matches. Separate multiple values with
- '--' to match multiple values (e.g.
- amy--aisha).
-
+ Choose who will receive this reminder. Filters keep everyone in the list and
+ check the matches. Separate multiple values with
+ '--' to match multiple values (e.g.
+ amy--aisha).
+