mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Conditionally show input for coordinator
Conflicts: app/views/admin/order_cycles/_form.html.haml
This commit is contained in:
@@ -21,10 +21,12 @@
|
||||
|
||||
|
||||
%h2 Coordinator
|
||||
= f.label :coordinator_id, 'Coordinator'
|
||||
= f.select :coordinator_id, order_cycle_coordinating_enterprise_options, { include_blank: true }, {'ng-model' => 'order_cycle.coordinator_id', 'ofn-on-change' => 'order_cycle.coordinator_fees = []', 'required' => true}
|
||||
= render 'coordinator_fees', f: f
|
||||
|
||||
-if current_user.enterprises.include? @order_cycle.coordinator
|
||||
= f.label :coordinator_id, 'Coordinator'
|
||||
= f.select :coordinator_id, order_cycle_coordinating_enterprise_options, { include_blank: true }, {'ng-model' => 'order_cycle.coordinator_id', 'ofn-on-change' => 'order_cycle.coordinator_fees = []', 'required' => true}
|
||||
= render 'coordinator_fees', f: f
|
||||
- else
|
||||
= @order_cycle.coordinator.name
|
||||
|
||||
%h2 Outgoing
|
||||
%table.exchanges
|
||||
|
||||
Reference in New Issue
Block a user