Skip to content

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

Use base modal in order modals templates

Anna Siwikac56570c6703
diff --git a/templates/dashboard/base_modal.html b/templates/dashboard/base_modal.html
index c806bee573..983567d310 100644
--- a/templates/dashboard/base_modal.html
+++ b/templates/dashboard/base_modal.html
@@ -10,15 +10,24 @@
</h5>
</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>
</div>
<div class="modal-footer">
- <a href="#!" class="modal-action modal-close btn-flat">
+ <a href="#!" class="modal-action modal-close btn-flat waves-effect">
{% block cancel_action %} {% trans "Cancel" context "Dashboard modal cancel action" %} {% endblock %}
</a>
- <button type="submit" class="modal-action btn-flat">
+ <button type="submit" class="modal-action btn-flat waves-effect">
{% block primary_action %} {% trans "Submit" context "Dashboard modal primary action" %} {% endblock %}
</button>
</div>
diff --git a/templates/dashboard/order/modal/add_note.html b/templates/dashboard/order/modal/add_note.html
index caa685ce20..49fd0e6ee2 100644
--- a/templates/dashboard/order/modal/add_note.html
+++ b/templates/dashboard/order/modal/add_note.html
@@ -1,26 +1,20 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load materializecss %}
-<form role="form" method="post" action="{% url 'dashboard:order-add-note' order_pk=order.pk %}" class="form-async" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <div class="row">
- <div class="col">
- <h5>
- {% trans "Add note" context "Modal add note title" %}
- </h5>
- </div>
- </div>
- <div class="row">
- {{ form|materializecss }}
- </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 note" context "Modal add note primary action" %}
- </button>
- </div>
-</form>
+{% block action_url %}
+{% url 'dashboard:order-add-note' order_pk=order.pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Add note" context "Modal add note title" %}
+{% endblock %}
+
+{% block content %}
+{{ form|materializecss }}
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Save note" context "Modal add note primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/add_variant_to_group.html b/templates/dashboard/order/modal/add_variant_to_group.html
index 68b4fc0e7c..ae68a84140 100644
--- a/templates/dashboard/order/modal/add_variant_to_group.html
+++ b/templates/dashboard/order/modal/add_variant_to_group.html
@@ -1,31 +1,25 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load materializecss %}
-<form id="add-variant-to-group-form" method="post" role="form" action="{% url 'dashboard:add-variant-to-group' order_pk=order.pk group_pk=group.pk %}" class="form-async" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <div class="row">
- <div class="col">
- <h5>
- {% blocktrans with shipment=group context "Modal group add variant title" %}
- Add product to {{ shipment }}
- {% endblocktrans %}
- </h5>
- </div>
- </div>
- <div class="row">
- <div class="col s12 m12 center-align">
- {{ form.variant|materializecss:"s12 m8" }}
- {{ form.quantity|materializecss:"s12 m4" }}
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <a href="#!" aria-hidden="true" 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 "Add" context "Modal group add variant primary action" %}
- </button>
- </div>
-</form>
+{% block action_url %}
+{% url 'dashboard:add-variant-to-group' order_pk=order.pk group_pk=group.pk %}
+{% endblock %}
+
+{% block title %}
+{% blocktrans trimmed with shipment=group context "Modal group add variant title" %}
+Add product to {{ shipment }}
+{% endblocktrans %}
+{% endblock %}
+
+{% block content %}
+<div class="col s12 m12 center-align">
+ {{ form.variant|materializecss:"s12 m8" }}
+ {{ form.quantity|materializecss:"s12 m4" }}
+</div>
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Add" context "Modal group add variant primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/cancel_line.html b/templates/dashboard/order/modal/cancel_line.html
index f9139a8e18..1ced1cf910 100644
--- a/templates/dashboard/order/modal/cancel_line.html
+++ b/templates/dashboard/order/modal/cancel_line.html
@@ -1,20 +1,22 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load materializecss %}
{% load prices_i18n %}
-<form class="form-async" role="form" method="post" action="{% url 'dashboard:orderline-cancel' order_pk=order.pk line_pk=item.pk %}" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <h5>
- {% trans "Remove order line?" context "Modal remove order line title" %}
- </h5>
- <p>
- {% blocktrans trimmed with order=order context "Modal remove order line text" %}
- Are you sure you want remove this order line?
- {% endblocktrans %}
- </p>
- {{ form|materializecss }}
- <table>
+{% block action_url %}
+{% url 'dashboard:orderline-cancel' order_pk=order.pk line_pk=item.pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Remove order line" context "Modal remove order line title" %}
+{% 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">
@@ -54,13 +56,9 @@
</tr>
</tbody>
</table>
- </div>
- <div class="modal-footer">
- <a href="#!" aria-hidden="true" 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 "Remove" context "Dashboard remove action" %}
- </button>
- </div>
-</form>
+</div>
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Remove" context "Modal remove order line primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/cancel_order.html b/templates/dashboard/order/modal/cancel_order.html
index aa837b8028..1da61916bb 100644
--- a/templates/dashboard/order/modal/cancel_order.html
+++ b/templates/dashboard/order/modal/cancel_order.html
@@ -1,26 +1,22 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load materializecss %}
-<div class="modal-content">
- <h5>
- {% trans "Cancel order?" context "Modal cancel order title" %}
- </h5>
- <p>
- {% blocktrans trimmed with order=order context "Modal cancel order text" %}
- Are you sure, you want cancel order {{ order }}?
- {% endblocktrans %}
- </p>
-</div>
+{% block action_url %}
+{% url 'dashboard:order-cancel' order_pk=order.pk %}
+{% endblock %}
+
+{% block title %}
+{% blocktrans trimmed with order=order context "Modal cancel order text" %}
+ Are you sure you want cancel order {{ order }}?
+{% endblocktrans %}
+{% endblock %}
+
+{% block cancel_action %}
+{% trans "Abort" context "Modal cancel order cancel action" %}
+{% endblock %}
-<div class="modal-footer">
- <form id="release-form" method="post" role="form" class="form-async"
- action="{% url 'dashboard:order-cancel' order_pk=order.pk %}" novalidate>
- {% csrf_token %}
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat waves-effect">
- {% trans "Abort" context "Dashboard abort action" %}
- </a>
- <button type="submit" class="modal-action btn-flat waves-effect">
- {% trans "Cancel Order" context "Modal cancel order primary action" %}
- </button>
- </form>
-</div>
+{% block primary_action %}
+{% trans "Cancel Order" context "Modal cancel order primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/cancel_shipment_group.html b/templates/dashboard/order/modal/cancel_shipment_group.html
index 666dbf464e..87a071f6d2 100644
--- a/templates/dashboard/order/modal/cancel_shipment_group.html
+++ b/templates/dashboard/order/modal/cancel_shipment_group.html
@@ -1,24 +1,27 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
-{% load materializecss %}
-<form method="post" role="form" action="{% url 'dashboard:cancel-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="form-async" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <h5>
- {% trans "Cancel shipment group?" context "Modal cancel shipment group title" %}
- </h5>
- <p>
- {% blocktrans trimmed context "Modal cancel shipment group text" %}
- After this action {{ group }} will be cancelled. Ordered items will be returned to stock.
- {% endblocktrans %}
- </p>
- </div>
- <div class="modal-footer">
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">
- {% trans "Back" context "Dashboard abort action" %}
- </a>
- <button type="submit" class="modal-action btn-flat">
- {% trans "Cancel this shipment" context "Modal cancel shipment group primary action" %}
- </button>
- </div>
-</form>
+{% block action_url %}
+{% url 'dashboard:cancel-delivery-group' order_pk=order.pk group_pk=group.pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Cancel shipment group?" context "Modal cancel shipment group title" %}
+{% 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>
+{% endblock %}
+
+{% block cancel_action %}
+{% trans "Abort" context "Modal cancel shipment group cancel action" %}
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Cancel this shipment" context "Modal cancel shipment group primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/capture.html b/templates/dashboard/order/modal/capture.html
index f6764cf560..8b0fb45506 100644
--- a/templates/dashboard/order/modal/capture.html
+++ b/templates/dashboard/order/modal/capture.html
@@ -1,35 +1,34 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load babel %}
{% load materializecss %}
{% load prices_i18n %}
-<form role="form" method="post" action="{% url 'dashboard:capture-payment' order_pk=order.pk payment_pk=payment.pk %}" class="form-async" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <h5>
- {% trans "Capture payment" context "Modal capture payment title" %}
- </h5>
- <div class="row">
- {{ form|materializecss }}
- </div>
- <h5>
- {% trans "Before this action" context "Modal capture payment title" %}
- </h5>
- <ul class="list">
- <li class="list-item">{% trans "Order total:" context "Modal capture payment list title" %}
- {% gross payment.order.get_total html=True %}
- </li>
- <li class="list-item">{% trans "Captured amount:" context "Modal capture payment list title" %}
- {{ captured|currencyfmt:currency }}
- </li>
- </ul>
- </div>
- <div class="modal-footer">
- <a href="#!" aria-hidden="true" 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 "Capture" context "Modal capture payment primary action" %}
- </button>
- </div>
-</form>
+{% block action_url %}
+{% url 'dashboard:capture-payment' order_pk=order.pk payment_pk=payment.pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Capture payment" context "Modal capture payment title" %}
+{% endblock %}
+
+{% 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>
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Capture" context "Modal capture payment primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/change_quantity.html b/templates/dashboard/order/modal/change_quantity.html
index 3fbca07416..2055a6a56d 100644
--- a/templates/dashboard/order/modal/change_quantity.html
+++ b/templates/dashboard/order/modal/change_quantity.html
@@ -1,22 +1,20 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load materializecss %}
-<form method="post" role="form" action="{% url 'dashboard:orderline-change-quantity' order_pk=order.pk line_pk=object.pk %}" class="form-async" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <h5>
- {% trans "Change quantity" context "Modal change quantity title" %}
- </h5>
- <div class="row">
- {{ form|materializecss:"s12 m6" }}
- </div>
- </div>
- <div class="modal-footer">
- <a href="#!" aria-hidden="true" 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 "Update" context "Dashboard update action" %}
- </button>
- </div>
-</form>
+{% block action_url %}
+{% url 'dashboard:orderline-change-quantity' order_pk=order.pk line_pk=object.pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Change quantity" context "Modal change quantity title" %}
+{% endblock %}
+
+{% block content %}
+{{ form|materializecss:"s12 m6" }}
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Update" context "Modal change quantity primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/order_remove_voucher.html b/templates/dashboard/order/modal/order_remove_voucher.html
index 1a373ff591..224ce30949 100644
--- a/templates/dashboard/order/modal/order_remove_voucher.html
+++ b/templates/dashboard/order/modal/order_remove_voucher.html
@@ -1,25 +1,29 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load materializecss %}
-<div class="modal-content">
- <h5>
- {% trans "Remove voucher?" context "Modal remove voucher from order title" %}
- </h5>
- <p>
- {% blocktrans trimmed with order=order context "Modal remove voucher from order text" %}
- Are you sure, you want remove voucher discount from {{ order }}?
- {% endblocktrans %}
- </p>
-</div>
-<div class="modal-footer">
- <form id="release-form" method="post" role="form" class="form-async"
- action="{% url 'dashboard:order-remove-voucher' order_pk=order.pk %}" novalidate>
- {% csrf_token %}
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat waves-effect">
- {% trans "Abort" context "Dashboard abort action" %}
- </a>
- <button type="submit" class="modal-action btn-flat waves-effect">
- {% trans "Remove voucher" context "Modal remove voucher from order primary action" %}
- </button>
- </form>
+
+{% block action_url %}
+{% url 'dashboard:order-remove-voucher' order_pk=order.pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Remove voucher" context "Modal remove voucher from order title" %}
+{% 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>
+{% endblock %}
+
+{% block cancel_action %}
+{% trans "Abort" context "Modal remove voucher from order cancel action" %}
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Remove voucher" context "Modal remove voucher from order primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/refund.html b/templates/dashboard/order/modal/refund.html
index 21de993d62..f68ed488bd 100644
--- a/templates/dashboard/order/modal/refund.html
+++ b/templates/dashboard/order/modal/refund.html
@@ -1,35 +1,35 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load babel %}
{% load materializecss %}
{% load prices_i18n %}
-<form role="form" method="post" action="{% url 'dashboard:refund-payment' order_pk=order.pk payment_pk=payment.pk %}" class="form-async" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <h5>
- {% trans "Refund payment" context "Modal refund payment title" %}
- </h5>
- <div class="row">
- {{ form|materializecss }}
- </div>
- <h5>
- {% trans "Before this action" context "Modal refund payment title" %}
- </h5>
- <ul class="list">
- <li class="list-item">{% trans "Order total:" context "Modal refund payment list title" %}
- {% gross payment.order.get_total html=True %}
- </li>
- <li class="list-item">{% trans "Captured amount:" context "Modal refund payment list title" %}
- {{ captured|currencyfmt:currency }}
- </li>
- </ul>
- </div>
- <div class="modal-footer">
- <a href="#!" aria-hidden="true" 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 "Refund" context "Modal refund payment primary action" %}
- </button>
- </div>
-</form>
+
+{% block action_url %}
+{% url 'dashboard:refund-payment' order_pk=order.pk payment_pk=payment.pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Refund payment" context "Modal refund payment title" %}
+{% endblock %}
+
+{% 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>
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Refund" context "Modal refund payment primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/release.html b/templates/dashboard/order/modal/release.html
index 4e7a857e02..61b0469d08 100644
--- a/templates/dashboard/order/modal/release.html
+++ b/templates/dashboard/order/modal/release.html
@@ -1,22 +1,23 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load materializecss %}
-<div class="modal-content">
- <h5>
- {% trans "Release payment" context "Modal release payment text" %}
- </h5>
- <p>
- {% trans "Do you want to release the payment?" context "Modal release payment text" %}
- </p>
-</div>
-<div class="modal-footer">
- <form id="release-form" method="post" role="form" class="form-async" action="{% url 'dashboard:release-payment' order_pk=order.pk payment_pk=payment.pk %}" novalidate>
- {% csrf_token %}
- <a href="#!" aria-hidden="true" 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 "Release" context "Modal release payment primary action" %}
- </button>
- </form>
+{% block action_url %}
+{% url 'dashboard:release-payment' order_pk=order.pk payment_pk=payment.pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Release payment" context "Modal release payment text" %}
+{% endblock %}
+
+{% block content %}
+<div class="col">
+ {% trans "Do you want to release the payment?" context "Modal release payment text" %}
+ {{ form|materializecss }}
</div>
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Release" context "Modal release payment primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/ship_shipment_group.html b/templates/dashboard/order/modal/ship_shipment_group.html
index a5030a519a..102b0f94d8 100644
--- a/templates/dashboard/order/modal/ship_shipment_group.html
+++ b/templates/dashboard/order/modal/ship_shipment_group.html
@@ -1,26 +1,23 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load materializecss %}
-<form method="post" role="form" action="{% url 'dashboard:ship-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="form-async" novalidate>
-{% csrf_token %}
- <div class="modal-content">
- <h5>
- {% trans "Dispatch shipment group" context "Modal ship shipment group title" %}
- </h5>
- <p>
- {% trans "Dispatch this shipment to the following address:" context "Modal ship shipment group text" %}
- </p>
- {% include 'dashboard/includes/_address.html' with address=group.order.shipping_address only %}
- <div class="row">
- {{ form|materializecss }}
- </div>
- </div>
- <div class="modal-footer">
- <a href="#!" aria-hidden="true" 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 "Ship" context "Modal ship shipment group primary action" %}
- </button>
- </div>
-</form>
+{% block action_url %}
+{% url 'dashboard:ship-delivery-group' order_pk=order.pk group_pk=group.pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Dispatch shipment group" context "Modal ship shipment group title" %}
+{% 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>
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Ship" context "Modal ship shipment group primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/shipment_group_stock.html b/templates/dashboard/order/modal/shipment_group_stock.html
index 53e5fab4c3..6d07d2b021 100644
--- a/templates/dashboard/order/modal/shipment_group_stock.html
+++ b/templates/dashboard/order/modal/shipment_group_stock.html
@@ -1,26 +1,20 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load materializecss %}
-<form method="post" role="form" action="{% url 'dashboard:orderline-change-stock' order_pk=order_pk line_pk=line_pk %}" class="form-async" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <div class="row">
- <div class="col">
- <h5>
- {% trans "Change stock" context "Modal change stock title" %}
- </h5>
- </div>
- </div>
- <div class="row">
- {{ form|materializecss:"s12 m6" }}
- </div>
- </div>
- <div class="modal-footer">
- <a href="#!" aria-hidden="true" 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 update action" %}
- </button>
- </div>
-</form>
+{% block action_url %}
+{% url 'dashboard:orderline-change-stock' order_pk=order_pk line_pk=line_pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Change stock" context "Modal change stock title" %}
+{% endblock %}
+
+{% block content %}
+{{ form|materializecss:"s12 m6" }}
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Change" context "Modal change stock primary action" %}
+{% endblock %}
diff --git a/templates/dashboard/order/modal/split_order_line.html b/templates/dashboard/order/modal/split_order_line.html
index dfd5ff4f66..bb22267890 100644
--- a/templates/dashboard/order/modal/split_order_line.html
+++ b/templates/dashboard/order/modal/split_order_line.html
@@ -1,22 +1,20 @@
+{% extends "dashboard/base_modal.html" %}
+
{% load i18n %}
{% load materializecss %}
-<form method="post" role="form" class="form-async" action="{% url 'dashboard:orderline-split' order_pk=order.pk line_pk=line_pk %}" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <h5>
- {% trans "Split order line" context "Modal split order line title" %}
- </h5>
- <div class="row">
- {{ form|materializecss:"s12 m6" }}
- </div>
- </div>
- <div class="modal-footer">
- <a href="#!" aria-hidden="true" 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 "Split" context "Modal split order line primary action" %}
- </button>
- </div>
-</form>
+{% block action_url %}
+{% url 'dashboard:orderline-split' order_pk=order.pk line_pk=line_pk %}
+{% endblock %}
+
+{% block title %}
+{% trans "Split order line" context "Modal split order line title" %}
+{% endblock %}
+
+{% block content %}
+{{ form|materializecss:"s12 m6" }}
+{% endblock %}
+
+{% block primary_action %}
+{% trans "Split" context "Modal split order line primary action" %}
+{% endblock %}