Merge pull request #2628 from alphagov/hide-postage-for-those-who-cant-choose

Don’t show postage to users who can’t choose it
This commit is contained in:
Chris Hill-Scott
2019-01-03 16:26:45 +00:00
committed by GitHub
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) %}