Don’t show postage to users who can’t choose it

If you can’t choose postage on a per-template basis, you shouldn’t be
see the thing that indicates that postage can be changed.
This commit is contained in:
Chris Hill-Scott
2019-01-03 15:18:53 +00:00
parent bbaa51443a
commit 3a2cfda8b2
2 changed files with 13 additions and 10 deletions

View File

@@ -21,13 +21,12 @@
Send
</a>
</div>
<div class="column-whole">
{% if current_service.has_permission("choose_postage") and template_postage %}
<h2 class="heading-small heading-inline">Postage</h2>: {{ template_postage }} class
{% elif (current_service.has_permission("choose_postage") and not template_postage) or not current_service.has_permission("choose_postage") %}
<h2 class="heading-small heading-inline">Postage</h2>: {{ current_service.postage }} class
{% if current_service.has_permission("choose_postage") %}
<div class="column-whole" id="postage">
<h2 class="heading-small heading-inline">Postage</h2>:
{{ template_postage or current_service.postage }} class
</div>
{% endif %}
</div>
{% endif %}
{% else %}
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) %}