Add option for one off in request to go live

When we first made this form you couldn’t send one off messages with
Notify. It’s interesting to us because it might help identity teams who
would benefit from email auth, or other features that we build in the
future for caseworkers.
This commit is contained in:
Chris Hill-Scott
2018-01-11 18:26:50 +00:00
parent 48106f22a3
commit 3b564b4f29
4 changed files with 27 additions and 15 deletions

View File

@@ -534,15 +534,9 @@ class RequestToGoLiveForm(StripWhitespaceForm):
'Will the number of messages increase and when will that start?',
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()]
)
method_one_off = BooleanField('One at a time')
method_upload = BooleanField('Upload a spreadsheet of recipients')
method_api = BooleanField('Integrate with the GOV.UK Notify API')
class ProviderForm(StripWhitespaceForm):

View File

@@ -165,7 +165,8 @@ def service_request_to_go_live(service_id):
'\nOrganisation type: {} ({:,} free text messages)'
'\nMOU in place: {}'
'\nChannel: {}\nStart date: {}\nStart volume: {}'
'\nPeak volume: {}\nUpload or API: {}'
'\nPeak volume: {}'
'\nFeatures: {}'
).format(
current_service['name'],
url_for('main.service_dashboard', service_id=current_service['id'], _external=True),
@@ -180,7 +181,11 @@ def service_request_to_go_live(service_id):
form.start_date.data,
form.start_volume.data,
form.peak_volume.data,
form.upload_or_api.data
formatted_list(filter(None, (
'one off' if form.method_one_off.data else None,
'file upload' if form.method_upload.data else None,
'API' if form.method_api.data else None,
)), before_each='', after_each='')
)
}

View File

@@ -44,9 +44,12 @@
{{ textbox(form.start_date, width='1-1') }}
{{ textbox(form.start_volume, width='1-1', hint='For example, 1000 a month.') }}
{{ textbox(form.peak_volume, width='1-1', hint='For example, Messages will increase to 20,000 a month in January.') }}
{{ radios(form.upload_or_api) }}
</div>
{{ checkbox_group('How are you going to send messages?', [
form.method_one_off,
form.method_upload,
form.method_api
]) }}
<p>
Once youve completed the tasks needed to set up, well make your service live. Well do this within one working day.
</p>