demarches-normaliennes/app/components/editable_champ/repetition_component/repetition_component.html.haml

14 lines
858 B
Text
Raw Normal View History

%fieldset
2023-11-15 17:58:26 +01:00
%legend.fr-h5{ legend_params }= @champ.libelle
- if @champ.description.present?
.notice{ notice_params }= render SimpleFormatComponent.new(@champ.description, allow_a: true)
2022-08-12 10:45:04 +02:00
.repetition{ id: dom_id(@champ, :rows) }
- @champ.row_ids.each.with_index(1) do |row_id, row_number|
= render EditableChamp::RepetitionRowComponent.new(form: @form, dossier: @champ.dossier, type_de_champ: @champ.type_de_champ, row_id:, row_number:, seen_at: @seen_at)
.actions
= render NestedForms::OwnedButtonComponent.new(formaction: champs_repetition_path(@champ.dossier, @champ.stable_id), http_method: :create, opt: { class: "fr-btn fr-btn--secondary fr-btn--icon-left fr-icon-add-circle-line fr-mb-3w", title: t(".add_title", libelle: @champ.libelle), id: dom_id(@champ, :create_repetition)}) do
= t(".add", libelle: @champ.libelle)