Create a hook when an organiser is enabling registration on Special:EnableEventRegistration AND Special:EditEventRegistration
This should be fired as the form is submitted after the registration is enabled.
The receiving code will return either a success or failure code
If a failure code is received, then an error should be shown.
If the error is an API failure, then the user should be allowed to retry
If the error is a validation issue, then the user should be allowed to correct the value, or leave it empty.
When the organizer chooses to enable registration, we should validate that the grant ID is valid.
- If it is valid, the registration should be enabled
- If it is invalid, the organizer should not be able to enable registration:
- They should receive a error message, which reads: "Please enter a valid grant ID."
- They can only enable registration if they update the grant ID to a valid ID or leave the grant ID field blank.
- If there is an error due to the Flux API:
- The user should see the following message: "There was an issue with validating the grant ID. Please try again later.”
- They can only enable registration if they leave the field blank.