mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 23:08:07 -04:00
Require email address for reporting problems
If you report a problem we want to be able to get back to you to find out more information, or to update you on the status of a fix. So it shouldn’t be possible to report a problem without providing an email address. This commit makes `email_address` a required field when `ticket_type` is problem. This requires a bit of fiddling with the tests which weren’t expecting to have to provide an email address. So the tests now either: - pass an email address - check for an error when they don’t pass an email address
This commit is contained in:
@@ -403,12 +403,16 @@ class SupportType(Form):
|
||||
)
|
||||
|
||||
|
||||
class Support(Form):
|
||||
class Feedback(Form):
|
||||
name = StringField('Name')
|
||||
email_address = StringField('Email address')
|
||||
feedback = TextAreaField('Your message', validators=[DataRequired(message="Can’t be empty")])
|
||||
|
||||
|
||||
class Problem(Feedback):
|
||||
email_address = email_address(label='Email address', gov_user=False)
|
||||
|
||||
|
||||
class Triage(Form):
|
||||
severe = RadioField(
|
||||
'Is it an emergency?',
|
||||
|
||||
Reference in New Issue
Block a user