mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-17 04:59:37 -04:00
Show error message if checkbox wasn’t checked
Because we were redirecting in all cases the error message wasn’t being shown. This commit changes the endpoint to respond with content (including an error message) if the `POST` is not successful.
This commit is contained in:
@@ -1297,7 +1297,9 @@ class ConfirmBroadcastForm(StripWhitespaceForm):
|
||||
self.confirm.label.text = self.generate_label(channel, max_phones)
|
||||
|
||||
if service_is_live:
|
||||
self.confirm.validators += (DataRequired(),)
|
||||
self.confirm.validators += (
|
||||
DataRequired('You need to confirm that you understand'),
|
||||
)
|
||||
|
||||
confirm = GovukCheckboxField("Confirm")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user