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,6 +1,6 @@
{% from "components/edit_link.html" import EditLink %} {% 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 %} {% 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 %} {% else %}

View File

@ -50,14 +50,14 @@
<div class="h2"> <div class="h2">
{{ "task_orders.new.review.reporting"| translate }} {{ "task_orders.new.review.reporting"| translate }}
{{ TOEditLink(screen=1, anchor="reporting") }} {{ TOEditLink(task_order=task_order, screen=1, anchor="reporting") }}
</div> </div>
{% include "fragments/task_order_review/reporting.html" %} {% include "fragments/task_order_review/reporting.html" %}
<hr> <hr>
<div class="h2"> <div class="h2">
{{ "task_orders.new.review.funding"| translate }} {{ "task_orders.new.review.funding"| translate }}
{{ TOEditLink(screen=2) }} {{ TOEditLink(task_order=task_order, screen=2) }}
</div> </div>
{% include "fragments/task_order_review/funding.html" %} {% include "fragments/task_order_review/funding.html" %}
@ -69,7 +69,7 @@
<div class="h2"> <div class="h2">
{{ "task_orders.new.review.oversight"| translate }} {{ "task_orders.new.review.oversight"| translate }}
{{ TOEditLink(screen=3) }} {{ TOEditLink(task_order=task_order, screen=3) }}
</div> </div>
{% include "fragments/task_order_review/oversight.html" %} {% include "fragments/task_order_review/oversight.html" %}
<hr> <hr>

View File

@ -11,12 +11,11 @@
{% block form %} {% block form %}
<h3 class="subheading">{{ "task_orders.new.review.app_info"| translate }} {{ TOEditLink(task_order=task_order, screen=1) }}</h3>
<h3 class="subheading">{{ "task_orders.new.review.app_info"| translate }} {{ TOEditLink(screen=1) }}</h3>
{% include "fragments/task_order_review/app_info.html" %} {% include "fragments/task_order_review/app_info.html" %}
<hr> <hr>
<h3 class="subheading">{{ "task_orders.new.review.reporting"| translate }} {{ TOEditLink(screen=1, anchor="reporting") }}</h3> <h3 class="subheading">{{ "task_orders.new.review.reporting"| translate }} {{ TOEditLink(task_order=task_order, screen=1, anchor="reporting") }}</h3>
<div class="row"> <div class="row">
{{ {{
@ -84,11 +83,11 @@
<hr> <hr>
<h3 class="subheading">{{ "task_orders.new.review.funding"| translate }} {{ TOEditLink(screen=2) }}</h3> <h3 class="subheading">{{ "task_orders.new.review.funding"| translate }} {{ TOEditLink(task_order=task_order, screen=2) }}</h3>
{% include "fragments/task_order_review/funding.html" %} {% include "fragments/task_order_review/funding.html" %}
<hr> <hr>
<h3 class="subheading">{{ "task_orders.new.review.oversight"| translate }} {{ TOEditLink(screen=3) }}</h3> <h3 class="subheading">{{ "task_orders.new.review.oversight"| translate }} {{ TOEditLink(task_order=task_order, screen=3) }}</h3>
{% include "fragments/task_order_review/oversight.html" %} {% include "fragments/task_order_review/oversight.html" %}
{% endblock %} {% endblock %}