style(conditionnel): dsfr button styles
This commit is contained in:
parent
8153f33896
commit
e2e9ddd625
6 changed files with 11 additions and 23 deletions
|
@ -74,13 +74,4 @@ form.form > .conditionnel {
|
||||||
border-color: $dark-red;
|
border-color: $dark-red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.add-row {
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 25px;
|
|
||||||
margin: 0 $default-padding $default-padding;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,9 +184,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.add-row {
|
|
||||||
margin-bottom: $default-fields-spacer;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=checkbox] {
|
input[type=checkbox] {
|
||||||
&.small-margin {
|
&.small-margin {
|
||||||
|
|
|
@ -91,10 +91,6 @@
|
||||||
|
|
||||||
.conditionnel {
|
.conditionnel {
|
||||||
color: $white;
|
color: $white;
|
||||||
|
|
||||||
.add-row {
|
|
||||||
background-color: $white;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,6 +147,7 @@
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
|
z-index: 10; // above DSFR buttons
|
||||||
}
|
}
|
||||||
|
|
||||||
.fill-duration {
|
.fill-duration {
|
||||||
|
|
|
@ -21,11 +21,13 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
|
||||||
end
|
end
|
||||||
|
|
||||||
def logic_conditionnel_button
|
def logic_conditionnel_button
|
||||||
|
html_class = 'fr-btn fr-btn--tertiary fr-btn--sm'
|
||||||
|
|
||||||
if @condition.nil?
|
if @condition.nil?
|
||||||
submit_tag(
|
submit_tag(
|
||||||
t('.enable_conditionnel'),
|
t('.enable_conditionnel'),
|
||||||
formaction: add_row_admin_procedure_condition_path(@procedure_id, @tdc.stable_id),
|
formaction: add_row_admin_procedure_condition_path(@procedure_id, @tdc.stable_id),
|
||||||
class: 'button small'
|
class: html_class
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
submit_tag(
|
submit_tag(
|
||||||
|
@ -33,7 +35,7 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
|
||||||
formmethod: 'delete',
|
formmethod: 'delete',
|
||||||
formnovalidate: true,
|
formnovalidate: true,
|
||||||
data: { confirm: t('.disable_conditionnel_alert') },
|
data: { confirm: t('.disable_conditionnel_alert') },
|
||||||
class: 'button small'
|
class: html_class
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -187,10 +189,10 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
|
||||||
|
|
||||||
def add_condition_tag
|
def add_condition_tag
|
||||||
tag.button(
|
tag.button(
|
||||||
tag.span('', class: 'icon add') + tag.span(t('.add_condition')),
|
t('.add_condition'),
|
||||||
formaction: add_row_admin_procedure_condition_path(@procedure_id, @tdc.stable_id),
|
formaction: add_row_admin_procedure_condition_path(@procedure_id, @tdc.stable_id),
|
||||||
formnovalidate: true,
|
formnovalidate: true,
|
||||||
class: 'add-row button small'
|
class: 'fr-btn fr-btn--secondary fr-btn--sm fr-icon-add-circle-line fr-btn--icon-left'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ fr:
|
||||||
display_if: Afficher si
|
display_if: Afficher si
|
||||||
enable_conditionnel: cliquer pour activer
|
enable_conditionnel: cliquer pour activer
|
||||||
disable_conditionnel: cliquer pour désactiver
|
disable_conditionnel: cliquer pour désactiver
|
||||||
disable_conditionnel_alert: "La logique conditionnelle appliquée à ce champ sera désactivé.\nVoulez-vous continuer ?"
|
disable_conditionnel_alert: "La logique conditionnelle appliquée à ce champ sera désactivée.\nVoulez-vous continuer ?"
|
||||||
select: Sélectionner
|
select: Sélectionner
|
||||||
add_condition: Ajouter une condition
|
add_condition: Ajouter une condition
|
||||||
remove_a_row: Supprimer la ligne
|
remove_a_row: Supprimer la ligne
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
= form_tag admin_procedure_condition_path(@procedure_id, @tdc.stable_id), method: :patch, class: 'form width-100' do
|
= form_tag admin_procedure_condition_path(@procedure_id, @tdc.stable_id), method: :patch, class: 'form width-100' do
|
||||||
.conditionnel.mt-2.width-100
|
.conditionnel.mt-2.width-100
|
||||||
.flex
|
.flex
|
||||||
%p.mr-2 Logique conditionnelle
|
%p
|
||||||
= logic_conditionnel_button
|
Logique conditionnelle
|
||||||
|
= logic_conditionnel_button
|
||||||
|
|
||||||
= render TypesDeChampEditor::ConditionsErrorsComponent.new(conditions: condition_per_row, upper_tdcs: @upper_tdcs)
|
= render TypesDeChampEditor::ConditionsErrorsComponent.new(conditions: condition_per_row, upper_tdcs: @upper_tdcs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue