refactor(ujs): experts_procedures controller to use turbo

This commit is contained in:
Paul Chavard 2022-07-13 14:03:24 +02:00 committed by simon lehericey
parent 099eecaa6c
commit 921f38833d

View file

@ -16,7 +16,7 @@
url: allow_expert_review_admin_procedure_path(@procedure),
html: { class: 'form procedure-form__column--form no-background' } do |f|
%label.toggle-switch
= f.check_box :allow_expert_review, class: 'toggle-switch-checkbox', onchange: 'this.form.submit()'
= f.check_box :allow_expert_review, class: 'toggle-switch-checkbox', onchange: 'this.form.requestSubmit()'
%span.toggle-switch-control.round
%span.toggle-switch-label.on
%span.toggle-switch-label.off
@ -30,7 +30,7 @@
url: experts_require_administrateur_invitation_admin_procedure_path(@procedure),
html: { class: 'form procedure-form__column--form no-background' } do |f|
%label.toggle-switch
= f.check_box :experts_require_administrateur_invitation, class: 'toggle-switch-checkbox', onchange: 'this.form.submit()'
= f.check_box :experts_require_administrateur_invitation, class: 'toggle-switch-checkbox', onchange: 'this.form.requestSubmit()'
%span.toggle-switch-control.round
%span.toggle-switch-label.on
%span.toggle-switch-label.off
@ -76,12 +76,11 @@
%td.text-center
= form_for expert_procedure,
url: admin_procedure_expert_path(id: expert_procedure),
remote: true,
method: :put,
authenticity_token: true,
data: { turbo: true },
html: { class: 'form procedure-form__column--form no-background' } do |f|
%label.toggle-switch
= f.check_box :allow_decision_access, class: 'toggle-switch-checkbox', onchange: 'this.form.submit()'
= f.check_box :allow_decision_access, class: 'toggle-switch-checkbox', onchange: 'this.form.requestSubmit()'
%span.toggle-switch-control.round
%span.toggle-switch-label.on
%span.toggle-switch-label.off