diff --git a/app/assets/stylesheets/conditions_component.scss b/app/assets/stylesheets/conditions_component.scss index 7cfcd62cb..9d2317a0d 100644 --- a/app/assets/stylesheets/conditions_component.scss +++ b/app/assets/stylesheets/conditions_component.scss @@ -32,6 +32,12 @@ .delete-column { width: 50px; + + button { + background: none; + border: none; + cursor: pointer; + } } } diff --git a/app/components/types_de_champ/conditions_component.rb b/app/components/types_de_champ/conditions_component.rb index 8a4d338a6..75b2e5e05 100644 --- a/app/components/types_de_champ/conditions_component.rb +++ b/app/components/types_de_champ/conditions_component.rb @@ -174,7 +174,12 @@ class TypesDeChamp::ConditionsComponent < ApplicationComponent end def delete_condition_tag(row_index) - submit_tag('X', formaction: delete_row_condition_path(@tdc.id, row_index: row_index)) + tag.button( + tag.span('', class: 'icon delete') + tag.span('Supprimer la ligne', class: 'sr-only'), + formaction: delete_row_admin_procedure_condition_path(@procedure_id, @tdc.id, row_index: row_index), + formmethod: 'delete', + formnovalidate: true + ) end def render?