Update address field logic (Z#23163120) (#4659)

* Move country-dependent JS logic to separate file (avoids code duplication for presale and control)
* Correctly apply "required" attribute to address state field
* Load address format information when selecting country
* Fix some other bugs and inconsistencies
This commit is contained in:
Mira
2024-11-29 14:56:56 +01:00
committed by GitHub
parent a1bf7be244
commit e8e9698a31
11 changed files with 168 additions and 138 deletions

View File

@@ -46,11 +46,13 @@
<div id="cp{{ pos.id }}">
<div class="panel-body">
{% for form in forms %}
{% if form.pos.item != pos.item %}
{# Add-Ons #}
<legend>+ {{ form.pos.item }}</legend>
{% endif %}
{% bootstrap_form form layout="control" %}
<div class="profile-scope">
{% if form.pos.item != pos.item %}
{# Add-Ons #}
<legend>+ {{ form.pos.item }}</legend>
{% endif %}
{% bootstrap_form form layout="control" %}
</div>
{% endfor %}
</div>
</div>