Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Replace confirm delete modals with base modal
Anna Siwik20ba8a7c7235
diff --git a/templates/dashboard/product/product_attribute/values/modal/confirm_delete.html b/templates/dashboard/product/product_attribute/values/modal/confirm_delete.htmlindex 216c69344e..66f2f71393 100644--- a/templates/dashboard/product/product_attribute/values/modal/confirm_delete.html+++ b/templates/dashboard/product/product_attribute/values/modal/confirm_delete.html@@ -1,19 +1,25 @@-{% extends "dashboard/base_modal_confirm_delete.html" %}+{% extends "dashboard/base_modal.html" %}{% load i18n %}+{% block form_class %}{% endblock %}+{% block action_url %}{% url "dashboard:product-attribute-value-delete" attribute_pk=attribute_pk value_pk=value.pk %}{% endblock %}{% block title %}-{% blocktrans trimmed context "Modal delete attribute text" %}+{% blocktrans trimmed context "Modal remove attribute value title" %}Delete attribute choice value {{ value }}{% endblocktrans %}{% endblock title %}{% block content %}-{% blocktrans trimmed context "Modal delete attribute text" %}-Are you sure you want to delete attribute choice value <strong>{{ value }}</strong>?+{% blocktrans trimmed context "Modal remove attribute value text" %}+ Are you sure you want to remove attribute choice value <strong>{{ value }}</strong>?{% endblocktrans %}{% endblock content %}++{% block primary_action %}+{% trans "Remove" context "Modal remove product primary action" %}+{% endblock %}diff --git a/templates/dashboard/product/product_image/modal/confirm_delete.html b/templates/dashboard/product/product_image/modal/confirm_delete.htmlindex 716ca90e60..84df0b6c0d 100644--- a/templates/dashboard/product/product_image/modal/confirm_delete.html+++ b/templates/dashboard/product/product_image/modal/confirm_delete.html@@ -1,4 +1,4 @@-{% extends "dashboard/base_modal_confirm_delete.html" %}+{% extends "dashboard/base_modal.html" %}{% load i18n %}{% load product_first_image from product_images %}@@ -10,14 +10,14 @@{% endblock %}{% block title %}-{% trans "Remove product image" context "Modal remove image text" %}+{% trans "Remove product image" context "Modal remove product image text" %}{% endblock %}{% block content %}<div class="center-align"><img class="responsive-img" src="{{ image.image.crop.255x255 }}" srcset="{{ image.image.crop.255x255 }} 1x, {{ image.image.crop.510x510 }} 2x" alt=""></div>-<p>{% trans "Are you sure you want to remove product image?" context "Modal remove image text" %}</p>+<p>{% trans "Are you sure you want to remove product image?" context "Modal remove product image text" %}</p>{% endblock content %}{% block primary_action %}diff --git a/templates/dashboard/product/product_variant/modal/select_images.html b/templates/dashboard/product/product_variant/modal/select_images.htmlindex 0fd15bd9ef..3711bfeb40 100644--- a/templates/dashboard/product/product_variant/modal/select_images.html+++ b/templates/dashboard/product/product_variant/modal/select_images.html@@ -1,23 +1,23 @@+{% extends "dashboard/base_modal.html" %}+{% load i18n %}{% load materializecss %}{% load utils %}-<form action="{% url "dashboard:variant-images" product_pk=product.pk variant_pk=variant.pk %}" method="post" novalidate>- {% csrf_token %}- <div class="modal-content">- <h5>- {% trans "Select variant images" context "Dashboard variant images modal" %}- </h5>- <div class="row">- <p>{% render_image_choice form.images %}</p>- </div>- </div>- <div class="modal-footer">- <a href="#!" class="modal-action modal-close btn-flat waves-effect">- {% trans "Cancel" context "Dashboard cancel action" %}- </a>- <button type="submit" class="modal-action btn-flat waves-effect">- {% trans "Save" context "Dashboard modal action" %}- </button>- </div>-</form>+{% block form_class %}{% endblock %}++{% block action_url %}+{% url "dashboard:variant-images" product_pk=product.pk variant_pk=variant.pk %}+{% endblock %}++{% block title %}+{% trans "Select variant images" context "Modal select variant images title" %}+{% endblock %}++{% block content %}+ <p>{% render_image_choice form.images %}</p>+{% endblock content %}++{% block primary_action %}+{% trans "Save" context "Modal select variant images primary action" %}+{% endblock %}diff --git a/templates/dashboard/shipping/modal/confirm_delete.html b/templates/dashboard/shipping/modal/confirm_delete.htmlindex c41ca2e683..d845ade701 100644--- a/templates/dashboard/shipping/modal/confirm_delete.html+++ b/templates/dashboard/shipping/modal/confirm_delete.html@@ -1,21 +1,27 @@-{% extends "dashboard/base_modal_confirm_delete.html" %}+{% extends "dashboard/base_modal.html" %}{% load i18n %}{% load prices_i18n %}{% load staticfiles %}+{% block form_class %}{% endblock %}+{% block action_url %}{% url "dashboard:shipping-method-delete" shipping_method.pk %}{% endblock %}{% block title %}-{% blocktrans context "Dashboard confirmation modal" %}+{% blocktrans context "Modal remove shipping method title" %}Remove shipping method {{ shipping_method }}{% endblocktrans %}{% endblock %}{% block content %}-{% blocktrans context "Dashboard confirmation modal" %}+{% blocktrans context "Modal remove shipping method text" %}Are you sure you want to remove shipping method <strong>{{ shipping_method}}</strong>?{% endblocktrans %}{% endblock %}++{% block primary_action %}+{% trans "Remove" context "Modal remove shipping method primary action" %}+{% endblock %}diff --git a/templates/dashboard/shipping/modal/country_confirm_delete.html b/templates/dashboard/shipping/modal/country_confirm_delete.htmlindex e37b9f2fdc..81f894ca53 100644--- a/templates/dashboard/shipping/modal/country_confirm_delete.html+++ b/templates/dashboard/shipping/modal/country_confirm_delete.html@@ -1,19 +1,25 @@-{% extends "dashboard/base_modal_confirm_delete.html" %}+{% extends "dashboard/base_modal.html" %}{% load i18n %}+{% block form_class %}{% endblock %}+{% block action_url %}{% url "dashboard:shipping-method-country-delete" shipping_method_pk=shipping_method_pk country_pk=country.pk %}{% endblock %}{% block title %}-{% blocktrans trimmed context "Modal delete attribute text" %}-Delete shipping {{ country }}+{% blocktrans trimmed context "Modal remove shipping method country title" %}+Remove shipping {{ country }}{% endblocktrans %}{% endblock title %}{% block content %}-{% blocktrans trimmed context "Modal delete attribute text" %}-Are you sure you want to delete shipping <strong>{{ country }}</strong>?+{% blocktrans trimmed context "Modal remove shipping method country text" %}+Are you sure you want to remove shipping <strong>{{ country }}</strong>?{% endblocktrans %}{% endblock content %}++{% block primary_action %}+{% trans "Remove" context "Modal remove shipping method country primary action" %}+{% endblock %}diff --git a/templates/dashboard/sites/modal/confirm_delete.html b/templates/dashboard/sites/modal/confirm_delete.htmlindex 106c4acf91..a8de75d619 100644--- a/templates/dashboard/sites/modal/confirm_delete.html+++ b/templates/dashboard/sites/modal/confirm_delete.html@@ -1,19 +1,25 @@-{% extends "dashboard/base_modal_confirm_delete.html" %}+{% extends "dashboard/base_modal.html" %}{% load i18n %}+{% block form_class %}{% endblock %}+{% block action_url %}{% url "dashboard:authorization-key-delete" site_settings_pk=site_settings_pk key_pk=key.pk %}{% endblock %}{% block title %}-{% blocktrans trimmed context "Modal delete authorization key text" %}-Delete authorization key {{ key }}+{% blocktrans trimmed context "Modal remove authorization key title" %}+Remove authorization key {{ key }}{% endblocktrans %}{% endblock title %}{% block content %}-{% blocktrans trimmed context "Modal delete authorization key text" %}-Are you sure you want to delete authorization key <strong>{{ key }}</strong>?+{% blocktrans trimmed context "Modal remove authorization key text" %}+Are you sure you want to remove authorization key <strong>{{ key }}</strong>?{% endblocktrans %}{% endblock content %}++{% block primary_action %}+{% trans "Remove" context "Modal remove authorization key primary action" %}+{% endblock %}diff --git a/templates/dashboard/staff/modal/confirm_delete.html b/templates/dashboard/staff/modal/confirm_delete.htmlindex 2e2de2e3a3..c20313de0b 100644--- a/templates/dashboard/staff/modal/confirm_delete.html+++ b/templates/dashboard/staff/modal/confirm_delete.html@@ -1,20 +1,28 @@-{% extends "dashboard/base_modal_confirm_delete.html" %}+{% extends "dashboard/base_modal.html" %}{% load i18n %}-{% block action_url %}{% url 'dashboard:staff-delete' pk=staff.pk %}{% endblock %}+{% block form_class %}{% endblock %}++{% block action_url %}+{% url 'dashboard:staff-delete' pk=staff.pk %}+{% endblock %}{% block title %}-{% blocktrans trimmed context "Modal remove group text" %}- Remove staff member <strong>{{ staff }}</strong>?+{% blocktrans trimmed context "Modal remove staff member title" %}+ Remove staff member <strong>{{ staff }}</strong>{% endblocktrans %}{% endblock %}{% block content %}-{% blocktrans trimmed context "Modal remove group text" %}+{% blocktrans trimmed context "Modal remove staff member text" %}<p>Are you sure you want to remove staff member?</p><p>Deleting staff member also removes him from customer list and removes all his related data (orders, payment etc.).</p><p>We strongly recommend not deleting user accounts that were used for purchases (for example customer which was promoted with staff member status).</p><p>{{ staff }} has <strong>{{ orders }}</strong> orders.</p>{% endblocktrans %}{% endblock content %}++{% block primary_action %}+{% trans "Remove" context "Modal remove staff member primary action" %}+{% endblock %}