Merge pull request #268 from dod-ccpo/fix-review-edit-link

Fix edit link for new request
This commit is contained in:
richard-dds 2018-09-11 13:30:19 -04:00 committed by GitHub
commit 31e3e4c359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,12 +15,20 @@
</div> </div>
{% endmacro %} {% endmacro %}
{% macro EditLink(screen) %}
{% if request_id %}
{{ url_for('requests.requests_form_update', screen=screen, request_id=request_id)}}
{% else %}
{{ url_for('requests.requests_form_update', screen=screen, request_id=None) }}
{% endif %}
{% endmacro %}
<hr> <hr>
<h2> <h2>
Details of Use Details of Use
{% if editable %} {% if editable %}
<a href="{{ url_for('requests.requests_form_update', screen=1, request_id=request_id) }}" class="icon-link"> <a href="{{ EditLink(1) }}" class="icon-link">
{{ Icon('edit') }} {{ Icon('edit') }}
<span>Edit this section</span> <span>Edit this section</span>
</a> </a>
@ -79,7 +87,7 @@
<h2> <h2>
Information About You Information About You
{% if editable %} {% if editable %}
<a href="{{ url_for('requests.requests_form_update', screen=2, request_id=request_id) }}" class="icon-link"> <a href="{{ EditLink(2) }}" class="icon-link">
{{ Icon('edit') }} {{ Icon('edit') }}
<span>Edit this section</span> <span>Edit this section</span>
</a> </a>
@ -108,7 +116,7 @@
<h2> <h2>
Workspace Owner Workspace Owner
{% if editable %} {% if editable %}
<a href="{{ url_for('requests.requests_form_update', screen=3, request_id=request_id) }}" class="icon-link"> <a href="{{ EditLink(3) }}" class="icon-link">
{{ Icon('edit') }} {{ Icon('edit') }}
<span>Edit this section</span> <span>Edit this section</span>
</a> </a>