mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-30 03:08:56 -04:00
Add letters to the request to go live page
It’s not either text messages, or emails, or both now – it’s any combination of the three channels. This commit adds ‘letters’ as an option on the request to go live page by changing the radio buttons to a group of checkboxes, so the user can choose as many or as few as they want. This commit also does a bunch of housekeeping stuff around the tests for this page, because they haven’t been touched in quite some time.
This commit is contained in:
@@ -431,15 +431,9 @@ class RequestToGoLiveForm(Form):
|
||||
],
|
||||
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()]
|
||||
)
|
||||
channel_email = BooleanField('Emails')
|
||||
channel_sms = BooleanField('Text messages')
|
||||
channel_letter = BooleanField('Letters')
|
||||
start_date = StringField(
|
||||
'When will you be ready to start sending messages?',
|
||||
validators=[DataRequired(message='Can’t be empty')]
|
||||
|
||||
@@ -34,6 +34,7 @@ from app.main.forms import (
|
||||
LetterBranding,
|
||||
ServiceInboundApiForm)
|
||||
from app import user_api_client, current_service, organisations_client, inbound_number_client
|
||||
from notifications_utils.formatters import formatted_list
|
||||
|
||||
|
||||
dummy_bearer_token = 'bearer_token_set'
|
||||
@@ -166,7 +167,11 @@ def service_request_to_go_live(service_id):
|
||||
current_service['name'],
|
||||
url_for('main.service_dashboard', service_id=current_service['id'], _external=True),
|
||||
form.mou.data,
|
||||
form.channel.data,
|
||||
formatted_list(filter(None, (
|
||||
'email' if form.channel_email.data else None,
|
||||
'text messages' if form.channel_sms.data else None,
|
||||
'letters' if form.channel_letter.data else None,
|
||||
)), before_each='', after_each=''),
|
||||
form.start_date.data,
|
||||
form.start_volume.data,
|
||||
form.peak_volume.data,
|
||||
|
||||
Reference in New Issue
Block a user