Don’t show postage choice for international letters

International letters don’t have a choice of postage. Under the hood
they are either `europe` or `rest-of-world`.

So, for letters that we detect are international, this commit:
- removes the radios buttons that give users the choice of postage
- passes through either `europe` or `rest-of-world` to the API,
  depending on what address we find in the letter

This will cause the API to 500 until it can accept `europe` or
`rest-of-world` as postage types, but this is probably OK because it’s
only our services that have international letters switched on at the
moment.
This commit is contained in:
Chris Hill-Scott
2020-05-20 11:12:33 +01:00
parent 08a701b70c
commit 68191a93ef
4 changed files with 136 additions and 10 deletions

View File

@@ -52,12 +52,19 @@
</p>
{% if current_service.live %}
{% if international %}
<p class="govuk-body">
Postage: international
</p>
{% endif %}
<form method="post" enctype="multipart/form-data" action="{{url_for(
'main.send_uploaded_letter',
service_id=current_service.id,
file_id=file_id,
)}}" class='page-footer'>
{{ radios(form.postage, hide_legend=true, inline=True) }}
{% if form.show_postage %}
{{ radios(form.postage, hide_legend=true, inline=True) }}
{% endif %}
{{ page_footer("Send 1 letter") }}
</form>
{% endif %}