Skip to content

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

Move modals' templates from includes to orders

Marcin Gębalaa4be08369c9a
diff --git a/saleor/dashboard/order/views.py b/saleor/dashboard/order/views.py
index 14b27b8292..c174562440 100644
--- a/saleor/dashboard/order/views.py
+++ b/saleor/dashboard/order/views.py
@@ -94,13 +94,13 @@ def manage_payment(request, pk, action):
else:
amount = 0
if action == 'release':
- template = 'dashboard/includes/modal_release.html'
+ template = 'dashboard/order/modal_release.html'
else:
if action == 'refund':
amount = payment.captured_amount
elif action == 'capture':
amount = payment.order.get_total().gross
- template = 'dashboard/includes/modal_capture_refund.html'
+ template = 'dashboard/order/modal_capture_refund.html'
initial = {'amount': amount, 'action': action}
form = ManagePaymentForm(payment=payment, initial=initial)
ctx = {'form': form, 'action': action, 'currency': payment.currency,
@@ -119,7 +119,7 @@ def edit_order_line(request, pk, action=None):
ctx = {'object': item, 'change_quantity_form': quantity_form,
'move_items_form': move_items_form}
ctx.update(csrf(request))
- template = 'dashboard/includes/modal_order_line_edit.html'
+ template = 'dashboard/order/modal_order_line_edit.html'
return TemplateResponse(request, template, ctx)
if action == 'change_quantity':
@@ -172,7 +172,7 @@ def ship_delivery_group(request, pk):
else:
ctx = {'group': group}
ctx.update(csrf(request))
- template = 'dashboard/includes/modal_ship_delivery_group.html'
+ template = 'dashboard/order/modal_ship_delivery_group.html'
return TemplateResponse(request, template, ctx)
diff --git a/saleor/dashboard/templates/dashboard/includes/modal_capture_refund.html b/saleor/dashboard/templates/dashboard/order/modal_capture_refund.html
similarity index 100%
rename from saleor/dashboard/templates/dashboard/includes/modal_capture_refund.html
rename to saleor/dashboard/templates/dashboard/order/modal_capture_refund.html
diff --git a/saleor/dashboard/templates/dashboard/includes/modal_order_line_edit.html b/saleor/dashboard/templates/dashboard/order/modal_order_line_edit.html
similarity index 100%
rename from saleor/dashboard/templates/dashboard/includes/modal_order_line_edit.html
rename to saleor/dashboard/templates/dashboard/order/modal_order_line_edit.html
diff --git a/saleor/dashboard/templates/dashboard/includes/modal_release.html b/saleor/dashboard/templates/dashboard/order/modal_release.html
similarity index 100%
rename from saleor/dashboard/templates/dashboard/includes/modal_release.html
rename to saleor/dashboard/templates/dashboard/order/modal_release.html
diff --git a/saleor/dashboard/templates/dashboard/includes/modal_ship_delivery_group.html b/saleor/dashboard/templates/dashboard/order/modal_ship_delivery_group.html
similarity index 100%
rename from saleor/dashboard/templates/dashboard/includes/modal_ship_delivery_group.html
rename to saleor/dashboard/templates/dashboard/order/modal_ship_delivery_group.html