Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix address delete form

weronka47dfd5886596
diff --git a/templates/userprofile/address-delete.html b/templates/userprofile/address-delete.html
index bd5757b9d5..5c3a9575c6 100644
--- a/templates/userprofile/address-delete.html
+++ b/templates/userprofile/address-delete.html
@@ -10,7 +10,7 @@
<address>{% include "userprofile/snippets/address-short.html" with address=address %}</address>
</div>
<div class="modal-footer">
- <form method="post" novalidate>
+ <form method="post" novalidate action="{% url 'profile:address-delete' pk=address.pk %}">
{% csrf_token %}
<a href="{% url 'profile:details' %}" class="btn btn-link">{% trans "Cancel" %}</a>
<button type="submit" class="btn danger">{% trans "Delete" %}</button>
diff --git a/templates/userprofile/details.html b/templates/userprofile/details.html
index 13ba1f71ef..bce1cc00ec 100644
--- a/templates/userprofile/details.html
+++ b/templates/userprofile/details.html
@@ -65,11 +65,11 @@
</div>
</div>
<div class="col-md-2 col-xs-4">
- <a data-toggle="modal" data-target=".modal-address-delete" href="{% url 'profile:address-delete' pk=address.pk %}"><img src="{% static 'img/icon_delete.svg' %}"></a>
+ <a data-toggle="modal" data-target=".modal-address-delete"><img src="{% static 'img/icon_delete.svg' %}"></a>
<a href="{% url 'profile:address-edit' pk=address.pk %}"><img src="{% static 'img/icon_edit.svg' %}"></a>
</div>
</div>
- {% include "userprofile/address-delete.html" %}
+ {% include "userprofile/address-delete.html" with pk=address.pk %}
{% endfor %}
{% if addresses|length == 0 %}
<div class="userprofile__address-empty">