Merge pull request #9490 from tchak/fix-champs-editor-styles

fix(champs-editor): remove unnecessary background color
This commit is contained in:
Paul Chavard 2023-09-19 11:11:15 +00:00 committed by GitHub
commit acc34fa30a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View file

@ -89,8 +89,6 @@
} }
&.type-header-section { &.type-header-section {
background-color: $blue-cumulus-950;
.head { .head {
background-color: $blue-cumulus-950; background-color: $blue-cumulus-950;
} }

View file

@ -46,7 +46,8 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
elsif row_number == 1 elsif row_number == 1
select_tag( select_tag(
"#{input_prefix}[top_operator_name]", "#{input_prefix}[top_operator_name]",
options_for_select(options_for_far_left_tag, @condition.class.name) options_for_select(options_for_far_left_tag, @condition.class.name),
class: 'fr-select'
) )
end end
end end
@ -71,7 +72,7 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
options_for_select(targets_for_select, selected_target), options_for_select(targets_for_select, selected_target),
onchange: "this.form.action = this.form.action + '/change_targeted_champ?row_index=#{row_index}'", onchange: "this.form.action = this.form.action + '/change_targeted_champ?row_index=#{row_index}'",
id: input_id_for('targeted_champ', row_index), id: input_id_for('targeted_champ', row_index),
class: { alert: !current_target_valid } class: { 'fr-select': true, alert: !current_target_valid }
) )
end end
@ -102,7 +103,7 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
input_name_for('operator_name'), input_name_for('operator_name'),
options_for_select(operators_for_select, selected: operator_name), options_for_select(operators_for_select, selected: operator_name),
id: input_id_for('operator_name', row_index), id: input_id_for('operator_name', row_index),
class: { alert: current_operator_invalid } class: { 'fr-select': true, alert: current_operator_invalid }
) )
end end
@ -149,13 +150,14 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
input_name_for('value'), input_name_for('value'),
options_for_select(booleans_for_select, right.to_json), options_for_select(booleans_for_select, right.to_json),
id: input_id_for('value', row_index), id: input_id_for('value', row_index),
class: { alert: right_invalid } class: { 'fr-select': true, alert: right_invalid }
) )
when :empty when :empty
select_tag( select_tag(
input_name_for('value'), input_name_for('value'),
options_for_select(empty_target_for_select), options_for_select(empty_target_for_select),
id: input_id_for('value', row_index) id: input_id_for('value', row_index),
class: 'fr-select'
) )
when :enum, :enums when :enum, :enums
enums_for_select = left.options(@upper_tdcs) enums_for_select = left.options(@upper_tdcs)
@ -168,7 +170,7 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
input_name_for('value'), input_name_for('value'),
options_for_select(enums_for_select, right.value), options_for_select(enums_for_select, right.value),
id: input_id_for('value', row_index), id: input_id_for('value', row_index),
class: { alert: right_invalid } class: { 'fr-select': true, alert: right_invalid }
) )
when :number when :number
text_field_tag( text_field_tag(
@ -176,10 +178,10 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
right.value, right.value,
required: true, required: true,
id: input_id_for('value', row_index), id: input_id_for('value', row_index),
class: { alert: right_invalid } class: { 'fr-select': true, alert: right_invalid }
) )
else else
text_field_tag(input_name_for('value'), '', id: input_id_for('value', row_index)) text_field_tag(input_name_for('value'), '', id: input_id_for('value', row_index), class: 'fr-input')
end end
end end

View file

@ -2,4 +2,4 @@
- if errors? - if errors?
.errors-summary= to_html_list(errors) .errors-summary= to_html_list(errors)
= @form.label :header_section_level, "Niveau du titre", for: dom_id(@tdc, :header_section_level) = @form.label :header_section_level, "Niveau du titre", for: dom_id(@tdc, :header_section_level)
= @form.select :header_section_level, header_section_options_for_select, {}, id: dom_id(@tdc, :header_section_level) = @form.select :header_section_level, header_section_options_for_select, {}, id: dom_id(@tdc, :header_section_level), class: 'fr-select width-33'