Add edit links to KO Review sections that link to TO form

This commit is contained in:
Montana 2019-02-15 10:33:18 -05:00
parent cac3a00b63
commit bef2b8ed24
3 changed files with 26 additions and 14 deletions

View File

@ -0,0 +1,9 @@
{% from "components/edit_link.html" import EditLink %}
{% macro TOEditLink(screen=1, anchor=None) %}
{% if task_order %}
{{ 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 %}
{% endmacro %}

View File

@ -2,7 +2,7 @@
{% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.funding" | translate %} {% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.funding" | translate %}
{% from "components/edit_link.html" import EditLink %} {% from "components/to_edit_link.html" import TOEditLink %}
{% from "components/required_label.html" import RequiredLabel %} {% from "components/required_label.html" import RequiredLabel %}
{% from "components/icon.html" import Icon %} {% from "components/icon.html" import Icon %}
{% from "components/date_picker.html" import DatePicker %} {% from "components/date_picker.html" import DatePicker %}
@ -42,15 +42,23 @@
</div> </div>
<div class="panel__content"> <div class="panel__content">
<div class="h2">{{ "task_orders.new.review.app_info"| translate }}</div> <div class="h2">
{{ "task_orders.new.review.app_info"| translate }}
</div>
{% include "fragments/task_order_review/app_info.html" %} {% include "fragments/task_order_review/app_info.html" %}
<hr> <hr>
<div class="h2">{{ "task_orders.new.review.reporting"| translate }}</div> <div class="h2">
{{ "task_orders.new.review.reporting"| translate }}
{{ TOEditLink(screen=1, anchor="reporting") }}
</div>
{% include "fragments/task_order_review/reporting.html" %} {% include "fragments/task_order_review/reporting.html" %}
<hr> <hr>
<div class="h2">{{ "task_orders.new.review.funding"| translate }}</div> <div class="h2">
{{ "task_orders.new.review.funding"| translate }}
{{ TOEditLink(screen=2) }}
</div>
{% include "fragments/task_order_review/funding.html" %} {% include "fragments/task_order_review/funding.html" %}
<div class="form__sub-fields"> <div class="form__sub-fields">
@ -59,7 +67,10 @@
</div> </div>
<hr> <hr>
<div class="h2">{{ "task_orders.new.review.oversight"| translate }}</div> <div class="h2">
{{ "task_orders.new.review.oversight"| translate }}
{{ TOEditLink(screen=3) }}
</div>
{% include "fragments/task_order_review/oversight.html" %} {% include "fragments/task_order_review/oversight.html" %}
<hr> <hr>

View File

@ -1,6 +1,6 @@
{% extends 'task_orders/_new.html' %} {% extends 'task_orders/_new.html' %}
{% from "components/edit_link.html" import EditLink %} {% from "components/to_edit_link.html" import TOEditLink %}
{% from "components/required_label.html" import RequiredLabel %} {% from "components/required_label.html" import RequiredLabel %}
{% from "components/icon.html" import Icon %} {% from "components/icon.html" import Icon %}
{% from "components/review_field.html" import ReviewField %} {% from "components/review_field.html" import ReviewField %}
@ -11,14 +11,6 @@
{% block form %} {% block form %}
{% macro TOEditLink(screen=1, anchor=None) %}
{% if task_order %}
{{ 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 %}
{% endmacro %}
<h3 class="subheading">{{ "task_orders.new.review.app_info"| translate }} {{ TOEditLink(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" %}