Merge pull request #1006 from alphagov/request-to-go-live-improvements

Make certain questions on request to go live radio buttons
This commit is contained in:
Chris Hill-Scott
2016-11-04 14:05:54 +01:00
committed by GitHub
4 changed files with 54 additions and 31 deletions

View File

@@ -384,26 +384,47 @@ class Feedback(Form):
class RequestToGoLiveForm(Form):
channel = StringField(
'Are you sending emails or text messages or both?',
validators=[DataRequired(message='Cant be empty')]
mou = RadioField(
(
'Has your organisation accepted the GOV.UK Notify data sharing and financial '
'agreement (Memorandum of Understanding)?'
),
choices=[
('yes', 'Yes'),
('no', 'No well send you a copy'),
('dont know', 'I dont know well check for you')
],
validators=[DataRequired()]
)
channel = RadioField(
'What kind of messages will you be sending?',
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?',
validators=[DataRequired(message='Cant be empty')]
)
start_volume = StringField(
'How many messages do you expect to send per month to start with? Give an estimate in numbers.',
'How many messages do you expect to send to start with?',
validators=[DataRequired(message='Cant be empty')]
)
peak_volume = StringField(
'Will the number of messages a month increase and when will that start? Give an estimate.',
'Will the number of messages increase and when will that start?',
validators=[DataRequired(message='Cant be empty')]
)
upload_or_api = StringField(
'Are you uploading a list of contacts that youre sending your message to, ' +
'or are you integrating your system with ours?',
validators=[DataRequired(message='Cant be empty')]
upload_or_api = RadioField(
'How are you going to send messages?',
choices=[
('File upload', 'Upload a spreadsheet of recipients'),
('API', 'Integrate with the GOV.UK Notify API'),
('API and file upload', 'Both')
],
validators=[DataRequired()]
)

View File

@@ -112,11 +112,13 @@ def service_request_to_go_live(service_id):
'subject': 'Request to go live',
'message': (
'On behalf of {} ({})\n\nExpected usage\n---'
'\nMOU in place: {}'
'\nChannel: {}\nStart date: {}\nStart volume: {}'
'\nPeak volume: {}\nUpload or API: {}'
).format(
current_service['name'],
url_for('main.service_dashboard', service_id=current_service['id'], _external=True),
form.mou.data,
form.channel.data,
form.start_date.data,
form.start_volume.data,