mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 23:08:07 -04:00
Merge pull request #905 from alphagov/sms-sender-no-prefix
Don’t prefix text messages is sender name is set
This commit is contained in:
@@ -75,7 +75,8 @@ def choose_template(service_id, template_type):
|
|||||||
templates=[
|
templates=[
|
||||||
Template(
|
Template(
|
||||||
template,
|
template,
|
||||||
prefix=current_service['name']
|
prefix=current_service['name'],
|
||||||
|
sms_sender=current_service['sms_sender']
|
||||||
) for template in service_api_client.get_service_templates(service_id)['data']
|
) for template in service_api_client.get_service_templates(service_id)['data']
|
||||||
if template['template_type'] == template_type
|
if template['template_type'] == template_type
|
||||||
],
|
],
|
||||||
@@ -90,7 +91,8 @@ def choose_template(service_id, template_type):
|
|||||||
def send_messages(service_id, template_id):
|
def send_messages(service_id, template_id):
|
||||||
template = Template(
|
template = Template(
|
||||||
service_api_client.get_service_template(service_id, template_id)['data'],
|
service_api_client.get_service_template(service_id, template_id)['data'],
|
||||||
prefix=current_service['name']
|
prefix=current_service['name'],
|
||||||
|
sms_sender=current_service['sms_sender']
|
||||||
)
|
)
|
||||||
|
|
||||||
form = CsvUploadForm()
|
form = CsvUploadForm()
|
||||||
@@ -149,7 +151,8 @@ def send_test(service_id, template_id):
|
|||||||
|
|
||||||
template = Template(
|
template = Template(
|
||||||
service_api_client.get_service_template(service_id, template_id)['data'],
|
service_api_client.get_service_template(service_id, template_id)['data'],
|
||||||
prefix=current_service['name']
|
prefix=current_service['name'],
|
||||||
|
sms_sender=current_service['sms_sender']
|
||||||
)
|
)
|
||||||
|
|
||||||
if len(template.placeholders) == 0 or request.method == 'POST':
|
if len(template.placeholders) == 0 or request.method == 'POST':
|
||||||
@@ -189,13 +192,13 @@ def send_test(service_id, template_id):
|
|||||||
@main.route("/services/<service_id>/send/<template_id>/from-api", methods=['GET'])
|
@main.route("/services/<service_id>/send/<template_id>/from-api", methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
def send_from_api(service_id, template_id):
|
def send_from_api(service_id, template_id):
|
||||||
template = Template(
|
|
||||||
service_api_client.get_service_template(service_id, template_id)['data'],
|
|
||||||
prefix=current_service['name']
|
|
||||||
)
|
|
||||||
return render_template(
|
return render_template(
|
||||||
'views/send-from-api.html',
|
'views/send-from-api.html',
|
||||||
template=template
|
template=Template(
|
||||||
|
service_api_client.get_service_template(service_id, template_id)['data'],
|
||||||
|
prefix=current_service['name'],
|
||||||
|
sms_sender=current_service['sms_sender']
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -216,14 +219,13 @@ def check_messages(service_id, template_type, upload_id):
|
|||||||
if not contents:
|
if not contents:
|
||||||
flash('There was a problem reading your upload file')
|
flash('There was a problem reading your upload file')
|
||||||
|
|
||||||
template = service_api_client.get_service_template(
|
|
||||||
service_id,
|
|
||||||
session['upload_data'].get('template_id')
|
|
||||||
)['data']
|
|
||||||
|
|
||||||
template = Template(
|
template = Template(
|
||||||
template,
|
service_api_client.get_service_template(
|
||||||
prefix=current_service['name']
|
service_id,
|
||||||
|
session['upload_data'].get('template_id')
|
||||||
|
)['data'],
|
||||||
|
prefix=current_service['name'],
|
||||||
|
sms_sender=current_service['sms_sender']
|
||||||
)
|
)
|
||||||
|
|
||||||
recipients = RecipientCSV(
|
recipients = RecipientCSV(
|
||||||
|
|||||||
@@ -19,4 +19,4 @@ pytz==2016.4
|
|||||||
|
|
||||||
git+https://github.com/alphagov/notifications-python-client.git@1.0.0#egg=notifications-python-client==1.0.0
|
git+https://github.com/alphagov/notifications-python-client.git@1.0.0#egg=notifications-python-client==1.0.0
|
||||||
|
|
||||||
git+https://github.com/alphagov/notifications-utils.git@8.7.5#egg=notifications-utils==8.7.5
|
git+https://github.com/alphagov/notifications-utils.git@9.0.0#egg=notifications-utils==9.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user