Skip to content

Commit 0202c0c

Browse files
maatinitoclaude
andcommitted
fix: Place formula field configuration after description in editor
- Move formula field configuration section after description field - Maintain consistency with integer and date fields ordering - Follow standard pattern: name, description, specific parameters 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 88cce55 commit 0202c0c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/components/types_de_champ_editor/champ_component/champ_component.html.haml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
5353
= t('.expression_reguliere.labels.error_message')
5454
= form.text_field :expression_reguliere_error_message, class: "fr-input small-margin small", id: dom_id(type_de_champ, :expression_reguliere_error_message)
5555

56+
- if !type_de_champ.header_section? && !type_de_champ.titre_identite?
57+
.cell.fr-mt-1w
58+
= form.label :description, "Description du champ (optionnel)", for: dom_id(type_de_champ, :description)
59+
= form.text_area :description, class: 'fr-input small-margin small width-100 resize-y', rows: 3, id: dom_id(type_de_champ, :description)
60+
5661
- if type_de_champ.formule?
5762
- available_champs = upper_coordinates.filter_map { |coord| { label: coord.type_de_champ.libelle, stable_id: coord.type_de_champ.stable_id } if coord.type_de_champ.fillable? }
5863
.cell.fr-mt-1w{ data: { controller: 'formula-editor', formula_editor_champs_value: available_champs.to_json } }
@@ -76,11 +81,6 @@
7681
- if type_de_champ.errors[:formule_expression].any?
7782
%p.fr-message.fr-message--error
7883
= type_de_champ.errors[:formule_expression].join(", ")
79-
80-
- if !type_de_champ.header_section? && !type_de_champ.titre_identite?
81-
.cell.fr-mt-1w
82-
= form.label :description, "Description du champ (optionnel)", for: dom_id(type_de_champ, :description)
83-
= form.text_area :description, class: 'fr-input small-margin small width-100 resize-y', rows: 3, id: dom_id(type_de_champ, :description)
8484
- if type_de_champ.header_section?
8585
.cell.fr-mt-1w
8686
= render TypesDeChampEditor::HeaderSectionComponent.new(form: form, tdc: type_de_champ, upper_tdcs: filtered_upper_tdcs)

0 commit comments

Comments
 (0)