Skip to content

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

Use base template modal confirmation for stock location removal

Jakub Draganekde0fbbe1845a
diff --git a/templates/dashboard/product/stock_location/modal_confirm_delete.html b/templates/dashboard/product/stock_location/modal_confirm_delete.html
index c66bf555bf..5d25e37af1 100644
--- a/templates/dashboard/product/stock_location/modal_confirm_delete.html
+++ b/templates/dashboard/product/stock_location/modal_confirm_delete.html
@@ -1,32 +1,24 @@
+{% extends "dashboard/modal_confirm_delete.html" %}
+
{% load i18n %}
-<form action="{% url 'dashboard:product-stock-location-delete' location.pk %}" method="post" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <h5>
- {% trans "Are you sure?" context "Dashboard confirmation modal" %}
- </h5>
- <div class="row">
- <div class="col l12">
- {% blocktrans trimmed context "Modal delete stock location text" %}
- You are about to delete a stock location <strong>{{ location }}</strong>.
- {% endblocktrans %}
- </div>
- </div>
- {% if stock_count %}
- {% blocktrans trimmed count counter=stock_count context "Modal delete stock location text" %}
- There is one stock associated with this stock location that will be deleted.
- {% plural %}
- There are {{ counter }} stocks associated with this stock location that will be deleted.
- {% endblocktrans %}
- {% endif %}
- </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>
+{% block action_url %}
+{% url 'dashboard:product-stock-location-delete' location.pk %}
+{% endblock %}
+
+{% block title %}
+{% blocktrans trimmed context "Modal delete stock location text" %}
+ You are about to delete a stock location <strong>{{ location }}</strong>.
+{% endblocktrans %}
+{% endblock title %}
+
+{% block content %}
+{% if stock_count %}
+{% blocktrans trimmed count counter=stock_count context "Modal delete stock location text" %}
+ There is one stock associated with this stock location that will be deleted.
+ {% plural %}
+ There are {{ counter }} stocks associated with this stock location that will be deleted.
+{% endblocktrans %}
+{% endif %}
+{% endblock %}
+