mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-23 05:28:53 +00:00
Use save bar in create order cycle page
This commit is contained in:
@@ -46,9 +46,8 @@
|
||||
= render 'add_exchange_form', f: f, type: 'distributor'
|
||||
|
||||
.actions
|
||||
- if @order_cycle.new_record?
|
||||
= f.submit 'Create', 'ng-click' => "submit($event, '#{main_app.admin_order_cycles_path}')", 'ng-disabled' => '!loaded()'
|
||||
|
||||
%span{'ng-show' => 'loaded()'}
|
||||
= link_to 'Cancel', main_app.admin_order_cycles_path
|
||||
%span{'ng-hide' => 'loaded()'} Loading...
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
= render 'coordinator_fees', f: f
|
||||
|
||||
.actions
|
||||
- if @order_cycle.new_record?
|
||||
= f.submit 'Create', 'ng-click' => "submit($event, '#{main_app.admin_order_cycles_path}')", 'ng-disabled' => '!loaded()'
|
||||
|
||||
%span{'ng-show' => 'loaded()'}
|
||||
= link_to 'Cancel', main_app.admin_order_cycles_path
|
||||
%span{'ng-hide' => 'loaded()'} Loading...
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
- ng_controller = order_cycles_simple_form ? 'AdminSimpleCreateOrderCycleCtrl' : 'AdminCreateOrderCycleCtrl'
|
||||
= admin_inject_order_cycle_instance
|
||||
|
||||
= form_for [main_app, :admin, @order_cycle], :url => '', :html => {:class => 'ng order_cycle', 'ng-app' => 'admin.orderCycles', 'ng-controller' => ng_controller} do |f|
|
||||
= form_for [main_app, :admin, @order_cycle], :url => '', :html => {:class => 'ng order_cycle', 'ng-app' => 'admin.orderCycles', 'ng-controller' => ng_controller, name: 'order_cycle_form'} do |f|
|
||||
|
||||
%save-bar{ buttons: "[{ text: 'Create', action: submit, param: '#{main_app.admin_order_cycles_path}' }]", form: "order_cycle_form" }
|
||||
|
||||
- if order_cycles_simple_form
|
||||
= render 'simple_form', f: f
|
||||
- else
|
||||
|
||||
Reference in New Issue
Block a user