Implement the frontend needed to allow users to indicate that an edit is related to an event they are participating in at the time of editing.
This field should only be shown if the user is currently participating in at least one active event during the edit session.
The implementation must work for both:
- Source Editor
- Visual Editor (VE)
The field will be a select box labeled:
"Is this edit related to an event?" TBD
The select options should contain the names of the active events the user is participating in, and the values should be the corresponding event IDs.
This task includes:
- Conditionally displaying the field based on user’s active events
- Using the appropriate hooks to inject the field into both editors
BDD
gherkin
Feature: Show event selection field for active participants
Scenario: User is editing a page and is participating in one or more events
Given the user is logged in
And the user is participating in at least one active event
When the user opens the Source Editor or the Visual Editor
Then a select box labeled "Is this edit related to an event?" TBD is shown
And the options are the names of the events the user is participating in
And the values are the event IDs
Scenario: User is editing a page and is not participating in any active event
Given the user is logged in
And the user is not participating in any active event
When the user opens the Source Editor or the Visual Editor
Then the event select box is not shown