Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Use base template modal confirmation for product variant deletion
Jakub Draganekc685a87a65cf
diff --git a/templates/dashboard/product/product_variant/modal_confirm_delete.html b/templates/dashboard/product/product_variant/modal_confirm_delete.htmlindex 4cb7e6331b..2f781c984c 100644--- a/templates/dashboard/product/product_variant/modal_confirm_delete.html+++ b/templates/dashboard/product/product_variant/modal_confirm_delete.html@@ -1,26 +1,18 @@+{% extends "dashboard/modal_confirm_delete.html" %}+{% load i18n %}{% load prices_i18n %}{% load staticfiles %}-<form action="{% url "dashboard:variant-delete" product_pk=product.pk variant_pk=variant.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 variant {{ variant }}.{% endblocktrans %}</p>- {% if is_only_variant %}- <strong>{% trans "This is the only variant of this product. If you remove it, the product will become unavailable." context "Dashboard confirmation modal" %}</strong>- {% endif %}- </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>+{% block action_url %}+{% url "dashboard:variant-delete" product_pk=product.pk variant_pk=variant.pk %}+{% endblock %}++{% block content %}+<p>+{% blocktrans context "Dashboard confirmation modal" %}Delete variant {{ variant }}.{% endblocktrans %}+</p>+{% if is_only_variant %}+<strong>{% trans "This is the only variant of this product. If you remove it, the product will become unavailable." context "Dashboard confirmation modal" %}</strong>+{% endif %}+{% endblock content %}