Make event registration cancellation email optional for back office cancellation #25207
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Sometimes, you don't want to send a cancellation email when you cancel someone's registration. You can do this if you use Edit and change the status, but not if you use Transfer or Cancel.
Now, this is optional for back office users, though the default is to send an email, so no change to behaviour unless the user unchecks this option. Self-service cancellation users will not see this option and will always receive an email. No change for transfers.
Before

No option to not send email. Blanks for fee level and amount if not present.
If contact has no email, confusing status message.After

Option to send email (default checked), only shown to back office users, when Cancel is selected and when the contact has an email. Fee level and amount are only shown if present (this change has also been made to the transfer form).
No message about email sent if no email has been sent. Confirmation says cancelled in first sentence for clarity.Comments
I noticed the 'Cancellations are not refundable.' warning is not working, because the text for the cancel option has been changed and this function, for some reason, looks for the text of the option instead of the value. But I'm not sure it should be fixed and have added an issue on this.