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:
Tom Byers
2020-11-11 15:55:55 +00:00
parent dd36137e3f
commit b0bab205da
3 changed files with 3 additions and 6 deletions

View File

@@ -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'
)