|
1 | 1 | - breadcrumb :workgroup_aggregation_settings, resource |
2 | 2 | - page_header_content_for resource |
3 | | -- javascript_additional_packs 'workgroups/edit_aggregate' |
4 | 3 | - workbenches = resource.workbenches.joins(:organisation).order('organisations.name') |
5 | 4 |
|
6 | 5 | .page_content |
|
10 | 9 | .col-lg-12 |
11 | 10 | h3= I18n.t('workgroups.edit_aggregate.nightly_aggregate') |
12 | 11 |
|
13 | | - .row |
14 | | - .col-lg-12 |
15 | | - = f.input :nightly_aggregate_enabled, as: :switchable_checkbox |
| 12 | + .row x-data="{ nightlyAggregateEnabled: #{resource.nightly_aggregate_enabled} || false}" |
16 | 13 | .col-lg-12 |
17 | | - .slave data-master="#workgroup_nightly_aggregate_enabled" data-value="true" |
18 | | - = f.input :nightly_aggregate_time, as: :time_picker |
19 | | - = f.input :nightly_aggregate_days, as: :day_type |
20 | | - = f.input :nightly_aggregate_notification_target, |
21 | | - collection: Aggregate.notification_target.values.delete_if{|value| value == "user"}.map { |k| [k && "enumerize.notification_target.#{k}".t, k] }, |
22 | | - selected: f.object.nightly_aggregate_notification_target, |
23 | | - input_html: { style: 'max-width: 350px;' } |
| 14 | + = f.input :nightly_aggregate_enabled, as: :switchable_checkbox, input_html: { 'x-on:click': 'nightlyAggregateEnabled = !nightlyAggregateEnabled' } |
| 15 | + .col-lg-12 x-show="nightlyAggregateEnabled" |
| 16 | + = f.input :nightly_aggregate_time, as: :time_picker |
| 17 | + = f.input :nightly_aggregate_days, as: :day_type |
| 18 | + = f.input :nightly_aggregate_notification_target, |
| 19 | + collection: Aggregate.notification_target.values.delete_if{|value| value == "user"}.map { |k| [k && "enumerize.notification_target.#{k}".t, k] }, |
| 20 | + selected: f.object.nightly_aggregate_notification_target, |
| 21 | + input_html: { style: 'max-width: 350px;' } |
24 | 22 | .row |
25 | 23 | .col-lg-12= I18n.t('workgroups.edit_aggregate.disclaimer').html_safe |
26 | 24 |
|
|
0 commit comments