help (aka tour) now works correctly throughout the notification flow

This commit is contained in:
Leo Hemsted
2017-06-30 11:49:03 +01:00
parent f31767e492
commit ef4d3d111f
5 changed files with 64 additions and 38 deletions

View File

@@ -19,11 +19,9 @@
{{ ajax_block(partials, updates_url, 'counts', finished=finished) }}
{{ ajax_block(partials, updates_url, 'notifications', finished=finished) }}
{% if not help %}
{{ page_footer(
secondary_link=url_for('.view_template', service_id=current_service.id, template_id=template.id),
secondary_link_text='Back to {}'.format(template.name)
) }}
{% endif %}
{{ page_footer(
secondary_link=url_for('.view_template', service_id=current_service.id, template_id=template.id),
secondary_link_text='Back to {}'.format(template.name)
) }}
{% endblock %}

View File

@@ -28,9 +28,13 @@
{{ template|string }}
<div class="bottom-gutter-3-2">
<form method="post" enctype="multipart/form-data" action="{{url_for('main.send_notification', service_id=current_service.id, template_id=template.id)}}" class='page-footer'>
<form method="post" enctype="multipart/form-data" action="{{url_for(
'main.send_notification',
service_id=current_service.id,
template_id=template.id,
help='3' if help else 0
)}}" class='page-footer'>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="hidden" name="help" value="{{ '3' if help else 0 }}" />
{% if not error %}
{% if template.template_type != 'letter' or not request.args.from_test %}
<input type="submit" class="button" value="Send 1 {{ message_count_label(1, template.template_type, suffix='') }}" />

View File

@@ -19,9 +19,11 @@
{{ ajax_block(partials, updates_url, 'counts', finished=finished) }}
{{ ajax_block(partials, updates_url, 'notifications', finished=finished) }}
{{ page_footer(
secondary_link=url_for('.view_template', service_id=current_service.id, template_id=template.id),
secondary_link_text='Back to {}'.format(template.name)
) }}
{% if not help %}
{{ page_footer(
secondary_link=url_for('.view_template', service_id=current_service.id, template_id=template.id),
secondary_link_text='Back to {}'.format(template.name)
) }}
{% endif %}
{% endblock %}