diff --git a/app/packs/entrypoints/workgroups/edit_aggregate.js b/app/packs/entrypoints/workgroups/edit_aggregate.js deleted file mode 100644 index 070f1c2ad0..0000000000 --- a/app/packs/entrypoints/workgroups/edit_aggregate.js +++ /dev/null @@ -1,3 +0,0 @@ -import MasterSlave from "../../src/helpers/master_slave" - -new MasterSlave("form") diff --git a/app/packs/entrypoints/workgroups/edit_merge.js b/app/packs/entrypoints/workgroups/edit_merge.js deleted file mode 100644 index 070f1c2ad0..0000000000 --- a/app/packs/entrypoints/workgroups/edit_merge.js +++ /dev/null @@ -1,3 +0,0 @@ -import MasterSlave from "../../src/helpers/master_slave" - -new MasterSlave("form") diff --git a/app/views/workgroups/edit_aggregate.html.slim b/app/views/workgroups/edit_aggregate.html.slim index c21034d1af..21c9936897 100644 --- a/app/views/workgroups/edit_aggregate.html.slim +++ b/app/views/workgroups/edit_aggregate.html.slim @@ -1,6 +1,5 @@ - breadcrumb :workgroup_aggregation_settings, resource - page_header_content_for resource -- javascript_additional_packs 'workgroups/edit_aggregate' - workbenches = resource.workbenches.joins(:organisation).order('organisations.name') .page_content @@ -10,17 +9,16 @@ .col-lg-12 h3= I18n.t('workgroups.edit_aggregate.nightly_aggregate') - .row - .col-lg-12 - = f.input :nightly_aggregate_enabled, as: :switchable_checkbox + .row x-data="{ nightlyAggregateEnabled: #{resource.nightly_aggregate_enabled} || false}" .col-lg-12 - .slave data-master="#workgroup_nightly_aggregate_enabled" data-value="true" - = f.input :nightly_aggregate_time, as: :time_picker - = f.input :nightly_aggregate_days, as: :day_type - = f.input :nightly_aggregate_notification_target, - collection: Aggregate.notification_target.values.delete_if{|value| value == "user"}.map { |k| [k && "enumerize.notification_target.#{k}".t, k] }, - selected: f.object.nightly_aggregate_notification_target, - input_html: { style: 'max-width: 350px;' } + = f.input :nightly_aggregate_enabled, as: :switchable_checkbox, input_html: { 'x-on:click': 'nightlyAggregateEnabled = !nightlyAggregateEnabled' } + .col-lg-12 x-show="nightlyAggregateEnabled" + = f.input :nightly_aggregate_time, as: :time_picker + = f.input :nightly_aggregate_days, as: :day_type + = f.input :nightly_aggregate_notification_target, + collection: Aggregate.notification_target.values.delete_if{|value| value == "user"}.map { |k| [k && "enumerize.notification_target.#{k}".t, k] }, + selected: f.object.nightly_aggregate_notification_target, + input_html: { style: 'max-width: 350px;' } .row .col-lg-12= I18n.t('workgroups.edit_aggregate.disclaimer').html_safe diff --git a/app/views/workgroups/edit_merge.html.slim b/app/views/workgroups/edit_merge.html.slim index 5238a6a7b5..432f9c290e 100644 --- a/app/views/workgroups/edit_merge.html.slim +++ b/app/views/workgroups/edit_merge.html.slim @@ -1,6 +1,5 @@ - breadcrumb :workgroup_edit_merge, resource - page_header_content_for resource -- javascript_additional_packs 'workgroups/edit_merge' .page_content .container-fluid @@ -13,12 +12,12 @@ .row .form-group - if has_feature?(:purge_merged_data) - .col-lg-12 - h3= I18n.t('workgroups.edit_merge.edit_purge_settings') - .col-lg-12 - = f.input :enable_purge_merged_data, as: :switchable_checkbox - .col-lg-12 - .slave data-master="#workgroup_enable_purge_merged_data" data-value="true" + .enable_purge_merged_data x-data="{ enablePurgeMergedData: #{resource.enable_purge_merged_data} || false}" + .col-lg-12 + h3= I18n.t('workgroups.edit_merge.edit_purge_settings') + .col-lg-12 + = f.input :enable_purge_merged_data, as: :switchable_checkbox, input_html: { 'x-on:click': 'enablePurgeMergedData = !enablePurgeMergedData' } + .col-lg-12 x-show="enablePurgeMergedData" = f.input :maximum_data_age, label: "workgroup.maximum_data_age".tmf, hint: "formtastic.hints.workgroup.maximum_data_age".t, input_html: {value: f.object.maximum_data_age || 0 } = cancel_button