mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add needed class to be displayed as datetimepicker input
- + Remplace `ng-disabled` by `ng-if` as its correctly handled by flatpickr/altInput combo.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
= f.label :orders_open_at, t('.orders_open')
|
||||
.omega.six.columns.fullwidth_inputs
|
||||
- if viewing_as_coordinator_of?(@order_cycle)
|
||||
= f.text_field :orders_open_at, 'datetimepicker' => 'order_cycle.orders_open_at', 'ng-model' => 'order_cycle.orders_open_at', 'ng-disabled' => '!loaded()', 'change-warning' => 'order_cycle'
|
||||
= f.text_field :orders_open_at, 'datetimepicker' => 'order_cycle.orders_open_at', 'ng-model' => 'order_cycle.orders_open_at', 'ng-if' => 'loaded()', 'change-warning' => 'order_cycle', class: "datetimepicker"
|
||||
- else
|
||||
{{ order_cycle.orders_open_at }}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
= f.label :orders_close, t('.orders_close')
|
||||
.six.columns.omega.fullwidth_inputs
|
||||
- if viewing_as_coordinator_of?(@order_cycle)
|
||||
= f.text_field :orders_close_at, 'datetimepicker' => 'order_cycle.orders_close_at', 'ng-model' => 'order_cycle.orders_close_at', 'ng-disabled' => '!loaded()', 'change-warning' => 'order_cycle'
|
||||
= f.text_field :orders_close_at, 'datetimepicker' => 'order_cycle.orders_close_at', 'ng-model' => 'order_cycle.orders_close_at', 'ng-if' => 'loaded()', 'change-warning' => 'order_cycle', class: "datetimepicker"
|
||||
- else
|
||||
{{ order_cycle.orders_close_at }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user