From 79224f6813d281a41329d6ce1d6c388154155151 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Thu, 31 Jan 2019 20:56:47 +0000 Subject: [PATCH] Add missing form tag and OC and shops injectors on order form to make the OC field, the distributor field and the update button work --- app/views/spree/admin/orders/_form.html.haml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/views/spree/admin/orders/_form.html.haml b/app/views/spree/admin/orders/_form.html.haml index 0dd73cf8fae..c6f892d7284 100644 --- a/app/views/spree/admin/orders/_form.html.haml +++ b/app/views/spree/admin/orders/_form.html.haml @@ -27,13 +27,17 @@ %legend= Spree.t(:order_total) %span.order-total= order.display_total - = render partial: 'spree/admin/orders/_form/distribution_fields' + = admin_inject_shops(module: 'admin.orders') + = admin_inject_order_cycles + %div{"ng-app" => "admin.orders", "ng-controller" => "orderCtrl", "ofn-distributor-id" => @order.distributor_id, "ofn-order-cycle-id" => @order.order_cycle_id} + = form_for @order, url: admin_order_url(@order), method: :put do |f| + = render partial: 'spree/admin/orders/_form/distribution_fields' - .filter-actions.actions{"ng-show" => "distributionChosen()"} - = button t(:update_and_recalculate_fees), 'icon-refresh' - %span.or - = t(:or) - = link_to_with_icon 'button icon-arrow-left', t(:back), admin_orders_url + .filter-actions.actions{"ng-show" => "distributionChosen()"} + = button t(:update_and_recalculate_fees), 'icon-refresh' + %span.or + = t(:or) + = link_to_with_icon 'button icon-arrow-left', t(:back), admin_orders_url = javascript_tag do var order_number = '#{@order.number}';