Skip to content

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

Use base template modal confirmation for stock removal

Jakub Draganek2d3e0ebb9aa6
diff --git a/templates/dashboard/product/stock/modal_confirm_delete.html b/templates/dashboard/product/stock/modal_confirm_delete.html
index 6ddf499c5a..cd7255f53e 100644
--- a/templates/dashboard/product/stock/modal_confirm_delete.html
+++ b/templates/dashboard/product/stock/modal_confirm_delete.html
@@ -1,23 +1,13 @@
+{% extends "dashboard/modal_confirm_delete.html" %}
+
{% load i18n %}
{% load prices_i18n %}
{% load staticfiles %}
-<form action="{% url 'dashboard:variant-stock-delete' product_pk=product.pk variant_pk=variant.pk stock_pk=stock.pk %}" method="post" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <div class="row">
- <div class="col s12">
- <h4>{% trans "Are you sure?" context "Dashboard confirmation modal" %}</h4>
- <p>{% blocktrans context "Dashboard confirmation modal" %} Delete stock {{ stock }}.{% endblocktrans %}</p>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="submit" class="modal-action btn-flat">
- {% trans "Delete" context "Dashboard delete action" %}
- </button>
- <a href="#!" class="modal-action modal-close btn-flat">
- {% trans "Cancel" context "Dashboard cancel action" %}
- </a>
- </div>
-</form>
\ No newline at end of file
+{% block action_url %}
+{% url 'dashboard:variant-stock-delete' product_pk=product.pk variant_pk=variant.pk stock_pk=stock.pk %}
+{% endblock %}
+
+{% block content %}
+<p>{% blocktrans context "Dashboard confirmation modal" %} Delete stock {{ stock }}.{% endblocktrans %}</p>
+{% endblock %}