mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-08 18:34:24 -04:00
Use radio buttons not textboxes for multi-choice
No need to make people type when they can click, and gives us consistent data.
This commit is contained in:
@@ -350,9 +350,14 @@ class Feedback(Form):
|
||||
|
||||
|
||||
class RequestToGoLiveForm(Form):
|
||||
channel = StringField(
|
||||
channel = RadioField(
|
||||
'Are you sending emails or text messages or both?',
|
||||
validators=[DataRequired(message='Can’t be empty')]
|
||||
choices=[
|
||||
('emails', 'Emails'),
|
||||
('text messages', 'Text messages'),
|
||||
('emails and text messages', 'Both')
|
||||
],
|
||||
validators=[DataRequired()]
|
||||
)
|
||||
start_date = StringField(
|
||||
'When will you be ready to start sending messages?',
|
||||
@@ -366,10 +371,15 @@ class RequestToGoLiveForm(Form):
|
||||
'Will the number of messages a month increase and when will that start? Give an estimate.',
|
||||
validators=[DataRequired(message='Can’t be empty')]
|
||||
)
|
||||
upload_or_api = StringField(
|
||||
upload_or_api = RadioField(
|
||||
'Are you uploading a list of contacts that you’re sending your message to, ' +
|
||||
'or are you integrating your system with ours?',
|
||||
validators=[DataRequired(message='Can’t be empty')]
|
||||
choices=[
|
||||
('File upload', 'Upload a spreadsheet of recipients'),
|
||||
('API', 'Integrate with the GOV.UK Notify API'),
|
||||
('API and file upload', 'Both')
|
||||
],
|
||||
validators=[DataRequired()]
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/radios.html" import radios %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
@@ -39,11 +40,11 @@
|
||||
</ul>
|
||||
|
||||
<form method="post">
|
||||
{{ textbox(form.channel, width='1-1') }}
|
||||
{{ radios(form.channel) }}
|
||||
{{ textbox(form.start_date, width='1-1') }}
|
||||
{{ textbox(form.start_volume, width='1-1') }}
|
||||
{{ textbox(form.peak_volume, width='1-1') }}
|
||||
{{ textbox(form.upload_or_api, width='1-1') }}
|
||||
{{ radios(form.upload_or_api) }}
|
||||
|
||||
<p>
|
||||
Once you’ve completed the tasks needed to set up, we’ll make your service live. We’ll do this within one working day.
|
||||
|
||||
Reference in New Issue
Block a user