Convert radios on SMS prefix page

Includes changing form.enabled to use
OnOffField, for consistency with other on/off
fields.

OnOffField's data is a boolean, not a string, so
some of the logic using it needed to be changed.
This commit is contained in:
Tom Byers
2020-07-03 11:48:17 +01:00
parent 1612812c5d
commit 58149ce34c
4 changed files with 10 additions and 20 deletions

View File

@@ -1942,13 +1942,7 @@ class CallbackForm(StripWhitespaceForm):
class SMSPrefixForm(StripWhitespaceForm):
enabled = RadioField(
'',
choices=[
('on', 'On'),
('off', 'Off'),
],
)
enabled = OnOffField('') # label is assigned on instantiation
def get_placeholder_form_instance(