Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default values to avoid notices when rendering (event templates screen) #22663

Merged

Conversation

braders
Copy link
Contributor

@braders braders commented Jan 29, 2022

Overview

Set default values to avoid notices when rendering (event templates screen)

Before

On the manage event templates screen, if an event template had participant listings disabled (i.e. no value set), then a notice would be thrown from the Smarty template.

Screenshot 2022-01-29 at 18 27 19

After

No notice is thrown.

Additionally, the "Participant listing" column now contains the text "Disabled", rather than an empty cell, which matches the language used on the edit form.

Comments

Default values have also been added for participant_role and event_type. These are required fields and so should always be set, however as there are if around where these keys are set it feels like it doesn't hurt to add the fallback values - it could catch edge-cases where event templates have been created through the API, or through poorly behaved extensions for example.

@civibot
Copy link

civibot bot commented Jan 29, 2022

(Standard links)

@civibot civibot bot added the master label Jan 29, 2022
@braders braders changed the title Set default values to avoid notices when rendering Set default values to avoid notices when rendering (event templates screen) Jan 29, 2022
@colemanw
Copy link
Member

Looks good

@colemanw colemanw merged commit 660c4ec into civicrm:master Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants