Skip to content

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

Move column div to base modal template

Anna Siwik6cf74f9af757
diff --git a/templates/dashboard/base_modal.html b/templates/dashboard/base_modal.html
index 4db0dc5c47..d0d419548a 100644
--- a/templates/dashboard/base_modal.html
+++ b/templates/dashboard/base_modal.html
@@ -13,16 +13,9 @@
</div>
</div>
<div class="row">
- {% if form.non_field_errors %}
- <blockquote>
- {% for non_field_error in form.non_field_errors %}
- {{ non_field_error }}
- {% endfor %}
- </blockquote>
- {% endif %}
- </div>
- <div class="row">
- {% block content %}{% endblock %}
+ <div class="col s12">
+ {% block content %}{% endblock %}
+ </div>
</div>
</div>
<div class="modal-footer">
diff --git a/templates/dashboard/category/modal/confirm_delete.html b/templates/dashboard/category/modal/confirm_delete.html
index 4ac36519ae..23dff21a44 100644
--- a/templates/dashboard/category/modal/confirm_delete.html
+++ b/templates/dashboard/category/modal/confirm_delete.html
@@ -16,33 +16,31 @@ Remove category {{ category }}
{% endblock %}
{% block content %}
-<div class="col">
- {% blocktrans trimmed with category=category context "Remove category modal title" %}
- Are you sure you want to remove category <strong>{{ category }}</strong>?
+{% blocktrans trimmed with category=category context "Remove category modal title" %}
+ Are you sure you want to remove category <strong>{{ category }}</strong>?
+{% endblocktrans %}
+{% if descendants %}
+<p>
+ {% trans "The following child categories will be removed:" context "Remove category modal text about descendant categories" %}
+ <ul>
+ {% recursetree descendants %}
+ {{ node.name }},
+ {% if not node.is_leaf_node %}
+ {{ children }}
+ {% endif %}
+ {% endrecursetree %}
+ </ul>
+</p>
+{% endif %}
+{% if products_count %}
+<p>
+ {% blocktrans count counter=products_count trimmed context "Remove category modal text about products" %}
+ There is one product in this category that will be removed.
+ {% plural %}
+ There are {{ counter }} products in this category that will be removed.
{% endblocktrans %}
- {% if descendants %}
- <p>
- {% trans "The following child categories will be removed:" context "Remove category modal text about descendant categories" %}
- <ul>
- {% recursetree descendants %}
- {{ node.name }},
- {% if not node.is_leaf_node %}
- {{ children }}
- {% endif %}
- {% endrecursetree %}
- </ul>
- </p>
- {% endif %}
- {% if products_count %}
- <p>
- {% blocktrans count counter=products_count trimmed context "Remove category modal text about products" %}
- There is one product in this category that will be removed.
- {% plural %}
- There are {{ counter }} products in this category that will be removed.
- {% endblocktrans %}
- </p>
- {% endif %}
-</div>
+</p>
+{% endif %}
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/category/modal/edit.html b/templates/dashboard/category/modal/edit.html
deleted file mode 100644
index 0b89adb425..0000000000
--- a/templates/dashboard/category/modal/edit.html
+++ /dev/null
@@ -1,25 +0,0 @@
-{% extends "dashboard/base_modal.html" %}
-
-{% load i18n %}
-{% load materializecss %}
-{% load mptt_tags %}
-
-{% block action_url %}
-{% url "dashboard:category-edit" root_pk=category.pk %}
-{% endblock %}
-
-{% block title %}
-{% blocktrans trimmed with category=category context "Edit category modal title" %}
-Edit {{ category }}
-{% endblocktrans %}
-{% endblock %}
-
-{% block content %}
-{{ form.name|materializecss:"s8 m10" }}
-{{ form.hidden|materializecss:"s4 m2" }}
-{{ form.description|materializecss }}
-{% endblock %}
-
-{% block primary_action %}
-{% trans "Update" context "Edit category primary action" %}
-{% endblock %}
diff --git a/templates/dashboard/customer/modal/confirm_promote.html b/templates/dashboard/customer/modal/confirm_promote.html
index ffa3c8d0ce..b48a534b13 100644
--- a/templates/dashboard/customer/modal/confirm_promote.html
+++ b/templates/dashboard/customer/modal/confirm_promote.html
@@ -13,9 +13,7 @@
{% endblock %}
{% block content %}
-<div class="col">
- {% trans "Are you sure?" context "Modal promote to staff member text" %}
-</div>
+{% trans "Are you sure?" context "Modal promote to staff member text" %}
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/discount/sale/modal/confirm_delete.html b/templates/dashboard/discount/sale/modal/confirm_delete.html
index dd6fd044d3..0934ab071e 100644
--- a/templates/dashboard/discount/sale/modal/confirm_delete.html
+++ b/templates/dashboard/discount/sale/modal/confirm_delete.html
@@ -13,11 +13,9 @@
{% endblock %}
{% block content %}
-<div class="col">
- {% blocktrans trimmed context "Modal remove sale (discount) title" %}
- Are you sure you want to remove <strong>{{ sale }}</strong>?
- {% endblocktrans %}
-</div>
+{% blocktrans trimmed context "Modal remove sale (discount) title" %}
+ Are you sure you want to remove <strong>{{ sale }}</strong>?
+{% endblocktrans %}
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/discount/voucher/modal/confirm_delete.html b/templates/dashboard/discount/voucher/modal/confirm_delete.html
index 6f2fac8b7c..1cb331e3ad 100644
--- a/templates/dashboard/discount/voucher/modal/confirm_delete.html
+++ b/templates/dashboard/discount/voucher/modal/confirm_delete.html
@@ -15,11 +15,9 @@ Remove voucher {{ voucher }}
{% endblock %}
{% block content %}
-<div class="col">
- {% blocktrans trimmed context "Modal remove voucher text" %}
- Are you sure you want to remove voucher <strong>{{ voucher }}</strong>?
- {% endblocktrans %}
-</div>
+{% blocktrans trimmed context "Modal remove voucher text" %}
+ Are you sure you want to remove voucher <strong>{{ voucher }}</strong>?
+{% endblocktrans %}
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/group/modal/confirm_delete.html b/templates/dashboard/group/modal/confirm_delete.html
index 43d034cb3e..d826403a8a 100644
--- a/templates/dashboard/group/modal/confirm_delete.html
+++ b/templates/dashboard/group/modal/confirm_delete.html
@@ -15,12 +15,10 @@
{% endblock %}
{% block content %}
-<div class="col">
- {% blocktrans trimmed context "Modal remove group text" %}
- Are you sure you want to remove group {{ group }}?
- <br> Users might lose permissions related to this group.
- {% endblocktrans %}
-</div>
+{% blocktrans trimmed context "Modal remove group text" %}
+ Are you sure you want to remove group {{ group }}?
+ <br> Users might lose permissions related to this group.
+{% endblocktrans %}
{% endblock content %}
{% block primary_action %}
diff --git a/templates/dashboard/order/modal/add_variant_to_group.html b/templates/dashboard/order/modal/add_variant_to_group.html
index ae68a84140..21ae4baf19 100644
--- a/templates/dashboard/order/modal/add_variant_to_group.html
+++ b/templates/dashboard/order/modal/add_variant_to_group.html
@@ -14,10 +14,8 @@ Add product to {{ shipment }}
{% endblock %}
{% block content %}
-<div class="col s12 m12 center-align">
- {{ form.variant|materializecss:"s12 m8" }}
- {{ form.quantity|materializecss:"s12 m4" }}
-</div>
+{{ form.variant|materializecss:"s12 m8" }}
+{{ form.quantity|materializecss:"s12 m4" }}
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/order/modal/cancel_line.html b/templates/dashboard/order/modal/cancel_line.html
index 1ced1cf910..d2cfc0e489 100644
--- a/templates/dashboard/order/modal/cancel_line.html
+++ b/templates/dashboard/order/modal/cancel_line.html
@@ -13,50 +13,48 @@
{% endblock %}
{% block content %}
-<div class="col s12 m12">
- {% trans "Are you sure you want remove this order line?" context "Modal remove order line text" %}
- {{ form|materializecss }}
- <table>
- <thead>
- <tr>
- <th class="wide">
- {% trans "Item" context "Modal remove order line table header" %}
- </th>
- <th>
- {% trans "SKU" context "Modal remove order line table header" %}
- </th>
- <th class="right-align">
- {% trans "Price" context "Modal remove order line table header" %}
- </th>
- <th class="right-align">
- {% trans "Quantity" context "Modal remove order line table header" %}
- </th>
- <th class="right-align">
- {% trans "Total" context "Modal remove order line table header" %}
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- {{ item.product_name }}<br>
- </td>
- <td>
- {{ item.product_sku }}
- </td>
- <td class="right-align">
- {% gross item.get_price_per_item html=True %}
- </td>
- <td class="right-align">
- {{ item.quantity }}
- </td>
- <td class="right-align">
- {% gross item.get_total html=True %}
- </td>
- </tr>
- </tbody>
- </table>
-</div>
+{% trans "Are you sure you want remove this order line?" context "Modal remove order line text" %}
+{{ form|materializecss }}
+<table>
+ <thead>
+ <tr>
+ <th class="wide">
+ {% trans "Item" context "Modal remove order line table header" %}
+ </th>
+ <th>
+ {% trans "SKU" context "Modal remove order line table header" %}
+ </th>
+ <th class="right-align">
+ {% trans "Price" context "Modal remove order line table header" %}
+ </th>
+ <th class="right-align">
+ {% trans "Quantity" context "Modal remove order line table header" %}
+ </th>
+ <th class="right-align">
+ {% trans "Total" context "Modal remove order line table header" %}
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ {{ item.product_name }}<br>
+ </td>
+ <td>
+ {{ item.product_sku }}
+ </td>
+ <td class="right-align">
+ {% gross item.get_price_per_item html=True %}
+ </td>
+ <td class="right-align">
+ {{ item.quantity }}
+ </td>
+ <td class="right-align">
+ {% gross item.get_total html=True %}
+ </td>
+ </tr>
+ </tbody>
+ </table>
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/order/modal/cancel_shipment_group.html b/templates/dashboard/order/modal/cancel_shipment_group.html
index 87a071f6d2..e1864bf5b6 100644
--- a/templates/dashboard/order/modal/cancel_shipment_group.html
+++ b/templates/dashboard/order/modal/cancel_shipment_group.html
@@ -11,11 +11,9 @@
{% endblock %}
{% block content %}
-<div class="col">
- {% blocktrans trimmed with shipment=group context "Modal cancel shipment group text" %}
- After this action {{ shipment }} will be cancelled. Ordered items will be returned to stock.
- {% endblocktrans %}
-</div>
+{% blocktrans trimmed with shipment=group context "Modal cancel shipment group text" %}
+ After this action {{ shipment }} will be cancelled. Ordered items will be returned to stock.
+{% endblocktrans %}
{% endblock %}
{% block cancel_action %}
diff --git a/templates/dashboard/order/modal/capture.html b/templates/dashboard/order/modal/capture.html
index 8b0fb45506..c62350b510 100644
--- a/templates/dashboard/order/modal/capture.html
+++ b/templates/dashboard/order/modal/capture.html
@@ -15,18 +15,15 @@
{% block content %}
{{ form|materializecss }}
-
-<div class="col s12 m12">
- {% trans "Before this action:" context "Modal capture payment text" %}
- <ul class="list">
- <li class="list-item">{% trans "Order total:" context "Modal capture payment list header" %}
- {% gross payment.order.get_total html=True %}
- </li>
- <li class="list-item">{% trans "Captured amount:" context "Modal capture payment list header" %}
- {{ captured|currencyfmt:currency }}
- </li>
- </ul>
-</div>
+{% trans "Before this action:" context "Modal capture payment text" %}
+<ul class="list">
+ <li class="list-item">{% trans "Order total:" context "Modal capture payment list header" %}
+ {% gross payment.order.get_total html=True %}
+ </li>
+ <li class="list-item">{% trans "Captured amount:" context "Modal capture payment list header" %}
+ {{ captured|currencyfmt:currency }}
+ </li>
+</ul>
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/order/modal/order_remove_voucher.html b/templates/dashboard/order/modal/order_remove_voucher.html
index 224ce30949..9e8df99190 100644
--- a/templates/dashboard/order/modal/order_remove_voucher.html
+++ b/templates/dashboard/order/modal/order_remove_voucher.html
@@ -13,11 +13,9 @@
{% endblock %}
{% block content %}
-<div class="col">
- {% blocktrans trimmed with order=order context "Modal remove voucher from order text" %}
- Are you sure you want remove voucher discount from order {{ order }}?
- {% endblocktrans %}
-</div>
+{% blocktrans trimmed with order=order context "Modal remove voucher from order text" %}
+ Are you sure you want remove voucher discount from order {{ order }}?
+{% endblocktrans %}
{% endblock %}
{% block cancel_action %}
diff --git a/templates/dashboard/order/modal/refund.html b/templates/dashboard/order/modal/refund.html
index f68ed488bd..7e3e302a2d 100644
--- a/templates/dashboard/order/modal/refund.html
+++ b/templates/dashboard/order/modal/refund.html
@@ -16,18 +16,15 @@
{% block content %}
{{ form|materializecss }}
-
-<div class="col s12 m12">
- {% trans "Before this action:" context "Modal refund payment text" %}
- <ul class="list">
- <li class="list-item">{% trans "Order total:" context "Modal refund payment list header" %}
- {% gross payment.order.get_total html=True %}
- </li>
- <li class="list-item">{% trans "Captured amount:" context "Modal refund payment list header" %}
- {{ captured|currencyfmt:currency }}
- </li>
- </ul>
-</div>
+{% trans "Before this action:" context "Modal refund payment text" %}
+<ul class="list">
+ <li class="list-item">{% trans "Order total:" context "Modal refund payment list header" %}
+ {% gross payment.order.get_total html=True %}
+ </li>
+ <li class="list-item">{% trans "Captured amount:" context "Modal refund payment list header" %}
+ {{ captured|currencyfmt:currency }}
+ </li>
+</ul>
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/order/modal/release.html b/templates/dashboard/order/modal/release.html
index 61b0469d08..596a0854a7 100644
--- a/templates/dashboard/order/modal/release.html
+++ b/templates/dashboard/order/modal/release.html
@@ -12,10 +12,8 @@
{% endblock %}
{% block content %}
-<div class="col">
- {% trans "Do you want to release the payment?" context "Modal release payment text" %}
- {{ form|materializecss }}
-</div>
+{% trans "Do you want to release the payment?" context "Modal release payment text" %}
+{{ form|materializecss }}
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/order/modal/ship_shipment_group.html b/templates/dashboard/order/modal/ship_shipment_group.html
index 102b0f94d8..edf0c3df58 100644
--- a/templates/dashboard/order/modal/ship_shipment_group.html
+++ b/templates/dashboard/order/modal/ship_shipment_group.html
@@ -12,10 +12,8 @@
{% endblock %}
{% block content %}
-<div class="col s12 m12">
- {% trans "Dispatch this shipment to the following address:" context "Modal ship shipment group text" %}
- {{ form|materializecss }}
-</div>
+{% trans "Dispatch this shipment to the following address:" context "Modal ship shipment group text" %}
+{{ form|materializecss }}
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/product/product_class/modal/confirm_delete.html b/templates/dashboard/product/product_class/modal/confirm_delete.html
index e4e2c4f2e1..1da3e50699 100644
--- a/templates/dashboard/product/product_class/modal/confirm_delete.html
+++ b/templates/dashboard/product/product_class/modal/confirm_delete.html
@@ -17,22 +17,20 @@
{% endblock title %}
{% block content %}
-<div class="col">
- <p>
- {% blocktrans trimmed context "Modal remove product class text" %}
- Are you sure you want to remove product class <strong>{{ product_class }}</strong>?
- {% endblocktrans %}
- </p>
- <p>
- {% if products %}
- {% blocktrans trimmed context "Modal remove product class text" with product_count=products.count %}
- There are {{ product_count }} products in product class.
- {% endblocktrans %}
- {% else %}
- {% blocktrans trimmed context "Modal remove product class text" %}
- There are no products in this product class.
- {% endblocktrans %}
- {% endif %}
- </p>
-</div>
+<p>
+ {% blocktrans trimmed context "Modal remove product class text" %}
+ Are you sure you want to remove product class <strong>{{ product_class }}</strong>?
+ {% endblocktrans %}
+</p>
+<p>
+{% if products %}
+ {% blocktrans trimmed context "Modal remove product class text" with product_count=products.count %}
+ There are {{ product_count }} products in product class.
+ {% endblocktrans %}
+{% else %}
+ {% blocktrans trimmed context "Modal remove product class text" %}
+ There are no products in this product class.
+ {% endblocktrans %}
+{% endif %}
+</p>
{% endblock %}
diff --git a/templates/dashboard/product/product_image/modal/confirm_delete.html b/templates/dashboard/product/product_image/modal/confirm_delete.html
index 0620d92b79..716ca90e60 100644
--- a/templates/dashboard/product/product_image/modal/confirm_delete.html
+++ b/templates/dashboard/product/product_image/modal/confirm_delete.html
@@ -14,12 +14,10 @@
{% endblock %}
{% block content %}
-<div class="col">
- <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>
+<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>
{% endblock content %}
{% block primary_action %}
diff --git a/templates/dashboard/product/product_variant/modal/confirm_delete.html b/templates/dashboard/product/product_variant/modal/confirm_delete.html
index 7c59d36a15..23582c28e9 100644
--- a/templates/dashboard/product/product_variant/modal/confirm_delete.html
+++ b/templates/dashboard/product/product_variant/modal/confirm_delete.html
@@ -17,18 +17,16 @@
{% endblock %}
{% block content %}
-<div class="col">
+<p>
+{% blocktrans context "Modal remove variant text" %}
+ Are you sure you want to remove variant <strong>{{ variant }}</strong> of product {{ product }}?
+{% endblocktrans %}
+</p>
+{% if is_only_variant %}
<p>
- {% blocktrans context "Modal remove variant text" %}
- Are you sure you want to remove variant <strong>{{ variant }}</strong> of product {{ product }}?
- {% endblocktrans %}
+ {% trans "This is the only variant of this product. If you remove it, the product will become unavailable." context "Modal remove variant text" %}
</p>
- {% if is_only_variant %}
- <p>
- {% trans "This is the only variant of this product. If you remove it, the product will become unavailable." context "Modal remove variant text" %}
- </p>
- {% endif %}
-</div>
+{% endif %}
{% endblock content %}
{% block primary_action %}
diff --git a/templates/dashboard/product/stock/modal/confirm_delete.html b/templates/dashboard/product/stock/modal/confirm_delete.html
index 1485064e68..7c89a9bd9b 100644
--- a/templates/dashboard/product/stock/modal/confirm_delete.html
+++ b/templates/dashboard/product/stock/modal/confirm_delete.html
@@ -16,11 +16,9 @@ Remove stock {{ stock }}
{% endblock title %}
{% block content %}
-<div class="col">
- {% blocktrans context "Modal remove stock text" %}
- Are you sure you want to remove stock <strong>{{ stock }}</strong>?
- {% endblocktrans %}
-</div>
+{% blocktrans context "Modal remove stock text" %}
+ Are you sure you want to remove stock <strong>{{ stock }}</strong>?
+{% endblocktrans %}
{% endblock content %}
{% block primary_action %}
diff --git a/templates/dashboard/product/stock_location/modal/confirm_delete.html b/templates/dashboard/product/stock_location/modal/confirm_delete.html
index 5d95e1f01b..4bd36dd2c2 100644
--- a/templates/dashboard/product/stock_location/modal/confirm_delete.html
+++ b/templates/dashboard/product/stock_location/modal/confirm_delete.html
@@ -15,22 +15,20 @@ Remove stock location {{ location }}
{% endblock title %}
{% block content %}
-<div class="col">
+<p>
+{% blocktrans trimmed context "Modal remove stock location text" %}
+ Are you sure you want to remove stock location <strong>{{ location }}</strong>?
+{% endblocktrans %}
+</p>
+{% if stock_count %}
<p>
- {% blocktrans trimmed context "Modal remove stock location text" %}
- Are you sure you want to remove stock location <strong>{{ location }}</strong>?
+ {% blocktrans trimmed count counter=stock_count context "Modal remove stock location text" %}
+ There is one stock associated with this stock location that will be removed.
+ {% plural %}
+ There are {{ counter }} stocks associated with this stock location that will be removed.
{% endblocktrans %}
</p>
- {% if stock_count %}
- <p>
- {% blocktrans trimmed count counter=stock_count context "Modal remove stock location text" %}
- There is one stock associated with this stock location that will be removed.
- {% plural %}
- There are {{ counter }} stocks associated with this stock location that will be removed.
- {% endblocktrans %}
- </p>
- {% endif %}
-</div>
+{% endif %}
{% endblock content %}
{% block primary_action %}