Merge pull request #700 from alphagov/tour-into-templates

Redirect to the templates page after the tour
This commit is contained in:
Chris Hill-Scott
2016-06-17 16:35:00 +01:00
committed by GitHub
2 changed files with 4 additions and 10 deletions

View File

@@ -92,10 +92,6 @@ def view_job(service_id, job_id):
job.get('notifications_failed', 0)
) == 0),
uploaded_file_name=job['original_file_name'],
first_email_template=[
template for template in service_api_client.get_service_templates(service_id)['data']
if template['template_type'] == 'email'
][0] if request.args.get('help') else None,
template=Template(
template,
prefix=current_service['name']

View File

@@ -32,12 +32,10 @@
Now try it with your own message
</p>
{% if request.args['help'] == '3' %}
{% if first_email_template %}
<a href='{{ url_for(".edit_service_template", service_id=current_service.id, template_id=first_email_template.id) }}'>
Write an email
</a>
{% endif %}
<a href='{{ url_for(".edit_service_template", service_id=current_service.id, template_id=template.id) }}'>
<a href='{{ url_for(".choose_template", service_id=current_service.id, template_type="email") }}'>
Write an email
</a>
<a href='{{ url_for(".choose_template", service_id=current_service.id, template_type="sms") }}'>
Write a text message
</a>
{% endif %}