Update tour.py

This commit is contained in:
Jonathan Bobel
2025-04-28 11:53:01 -04:00
parent fb20ea6e1c
commit 7410a00519

View File

@@ -139,14 +139,21 @@ def tour_step(service_id, template_id, step_index):
def _get_tour_step_back_link(service_id, template_id, step_index): def _get_tour_step_back_link(service_id, template_id, step_index):
if step_index == 1: if step_index == 1:
return url_for(".begin_tour", service_id=service_id, template_id=template_id) return {
"href": {
return url_for( "url": url_for('main.begin_tour', service_id=service_id, template_id=template_id),
".tour_step", "text": "Back to tour start"
service_id=service_id, },
template_id=template_id, "html": "Back to tour start"
step_index=step_index - 1, }
) else:
return {
"href": {
"url": url_for('main.tour_step', service_id=service_id, template_id=template_id, step_index=step_index-1),
"text": "Back to previous step"
},
"html": "Back to previous step"
}
@main.route( @main.route(
@@ -183,12 +190,18 @@ def check_tour_notification(service_id, template_id):
) )
) )
back_link = url_for( back_link = {
".tour_step", "href": {
service_id=current_service.id, "url": url_for(
template_id=template_id, "main.tour_step",
step_index=len(placeholders), service_id=current_service.id,
) template_id=template_id,
step_index=len(placeholders),
),
"text": "Back to previous step"
},
"html": "Back to previous step"
}
template.values = get_recipient_and_placeholders_from_session( template.values = get_recipient_and_placeholders_from_session(
template.template_type template.template_type