mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Plug GovukRadiosField into edit sms|email pages
Proof of concept for the GovukRadiosField class. Includes the removal of the a DataRequired validator. This doesn't seem to be needed as the RadioField superclass catches any submissions without any data from field.choices in its pre_validate method (which also outputs the correct error message).
This commit is contained in:
@@ -1294,14 +1294,13 @@ class BaseTemplateForm(StripWhitespaceForm):
|
||||
NoCommasInPlaceHolders()
|
||||
]
|
||||
)
|
||||
process_type = RadioField(
|
||||
process_type = GovukRadiosField(
|
||||
"Use priority queue?",
|
||||
choices=[
|
||||
('priority', 'Yes'),
|
||||
('normal', 'No'),
|
||||
],
|
||||
thing='yes or no',
|
||||
validators=[DataRequired()],
|
||||
default='normal'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user