From cecf21050321688a297e37aea44e07b81d146030 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Tue, 28 Jun 2022 12:39:05 +0200 Subject: [PATCH] style add row button --- app/assets/stylesheets/conditions_component.scss | 9 +++++++++ app/components/types_de_champ/conditions_component.rb | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/conditions_component.scss b/app/assets/stylesheets/conditions_component.scss index 9d2317a0d..152eb8c0a 100644 --- a/app/assets/stylesheets/conditions_component.scss +++ b/app/assets/stylesheets/conditions_component.scss @@ -65,4 +65,13 @@ border-color: $dark-red; } } + + .add-row { + background: none; + border: none; + cursor: pointer; + font-size: 16px; + line-height: 25px; + margin: 0 $default-padding $default-padding; + } } diff --git a/app/components/types_de_champ/conditions_component.rb b/app/components/types_de_champ/conditions_component.rb index 75b2e5e05..a9eaf4efc 100644 --- a/app/components/types_de_champ/conditions_component.rb +++ b/app/components/types_de_champ/conditions_component.rb @@ -170,7 +170,12 @@ class TypesDeChamp::ConditionsComponent < ApplicationComponent end def add_condition_tag - submit_tag('Ajouter une condition', formaction: add_row_condition_path(@tdc.id)) + tag.button( + tag.span('', class: 'icon add') + tag.span("Ajouter une condition"), + formaction: add_row_admin_procedure_condition_path(@procedure_id, @tdc.id), + formnovalidate: true, + class: 'add-row' + ) end def delete_condition_tag(row_index)