Pass task order to TOEditLink macro

This commit is contained in:
Montana
2019-02-19 11:34:00 -05:00
parent bef2b8ed24
commit e20240b878
3 changed files with 9 additions and 10 deletions

View File

@@ -1,8 +1,8 @@
{% from "components/edit_link.html" import EditLink %}
{% macro TOEditLink(screen=1, anchor=None) %}
{% macro TOEditLink(task_order=None, screen=1, anchor=None) %}
{% if task_order %}
{{ EditLink(url_for("task_orders.new", screen=screen, task_order_id=task_order.id, _anchor=anchor)) }}
{{ EditLink(url_for("task_orders.new", screen=screen, task_order_id=task_order.id, _anchor=anchor)) }}
{% else %}
{{ EditLink(url_for("task_orders.new", screen=screen, _anchor=anchor)) }}
{% endif %}