refactor(js): radio_enabled_submit -> enable_submit_if_checked

This commit is contained in:
simon lehericey 2023-12-19 15:30:12 +01:00
parent 96a8e7888e
commit 2c367846da
4 changed files with 14 additions and 11 deletions

View file

@ -40,10 +40,10 @@
- elsif @state == 'choix'
= form_for :choice,
method: :patch,
data: { controller: 'radio-enabled-submit' },
data: { controller: 'enable-submit-if-checked' },
url: wizard_admin_procedure_groupe_instructeurs_path(@procedure) do |f|
%div{ data: { 'action': "click->radio-enabled-submit#click" } }
%div{ data: { 'action': "click->enable-submit-if-checked#click" } }
= render Dsfr::RadioButtonListComponent.new(form: f,
target: :state,
buttons: [ { label: 'À partir dun champ', value: 'routage_simple', hint: 'crée les groupes en fonction dun champ du formulaire' } ,
@ -54,4 +54,4 @@
%li
= link_to 'Retour', options_admin_procedure_groupe_instructeurs_path(@procedure), class: 'fr-btn fr-btn--secondary'
%li
%button.fr-btn{ disabled: true, data: { 'radio-enabled-submit-target': 'submit' } } Continuer
%button.fr-btn{ disabled: true, data: { 'enable-submit-if-checked-target': 'submit' } } Continuer