fix(turbo): use link_to instead of submit button
This commit is contained in:
parent
219fc2f3bc
commit
c5addb4829
2 changed files with 2 additions and 2 deletions
|
@ -3,6 +3,6 @@
|
||||||
= render partial: 'shared/dossiers/editable_champs/repetition_row', locals: { form: form, champ: champ, row: champs }
|
= render partial: 'shared/dossiers/editable_champs/repetition_row', locals: { form: form, champ: champ, row: champs }
|
||||||
|
|
||||||
.actions{ 'data-turbo': 'true' }
|
.actions{ 'data-turbo': 'true' }
|
||||||
= button_tag type: :submit, form: :turbo_form, formaction: champs_repetition_path(champ.id), formmethod: :post, class: 'button add-row' do
|
= link_to champs_repetition_path(champ.id), data: { turbo_method: :post }, class: 'button add-row' do
|
||||||
%span.icon.add
|
%span.icon.add
|
||||||
Ajouter un élément pour « #{champ.libelle} »
|
Ajouter un élément pour « #{champ.libelle} »
|
||||||
|
|
|
@ -5,5 +5,5 @@
|
||||||
= render partial: 'shared/dossiers/editable_champs/editable_champ', locals: { form: form, champ: champ }
|
= render partial: 'shared/dossiers/editable_champs/editable_champ', locals: { form: form, champ: champ }
|
||||||
|
|
||||||
.flex.row-reverse{ 'data-turbo': 'true' }
|
.flex.row-reverse{ 'data-turbo': 'true' }
|
||||||
= button_tag type: :submit, form: :turbo_form, formaction: champs_repetition_path(champ.id, champ_ids: row.map(&:id), row_id: row_dom_id), formmethod: :delete, class: 'button danger remove-row' do
|
= link_to champs_repetition_path(champ.id, champ_ids: row.map(&:id), row_id: row_dom_id), data: { turbo_method: :delete }, class: 'button danger remove-row' do
|
||||||
Supprimer l’élément
|
Supprimer l’élément
|
||||||
|
|
Loading…
Reference in a new issue