Fix edit link for new request

This commit is contained in:
richard-dds 2018-09-11 11:17:56 -04:00
parent f69396ac73
commit 6d5528837e

View File

@ -15,12 +15,20 @@
</div>
{% 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>
<h2>
Details of Use
{% 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') }}
<span>Edit this section</span>
</a>
@ -79,7 +87,7 @@
<h2>
Information About You
{% 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') }}
<span>Edit this section</span>
</a>
@ -108,7 +116,7 @@
<h2>
Workspace Owner
{% 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') }}
<span>Edit this section</span>
</a>