demarches-normaliennes/app/components/dossiers/geo_area_component.html.haml
2024-02-08 17:25:22 +01:00

11 lines
643 B
Text

%li{ class: editing ? 'fr-mb-1w' : 'flex column fr-mb-2w', data: { controller: 'geo-area', geo_area_id_value: geo_area.id } }
- if editing
= link_to '#', data: { action: 'geo-area#onClick' } do
= geo_area.label
= text_field_tag :description, geo_area.description, data: { action: 'focus->geo-area#onFocus input->geo-area#onInput', geo_area_target: 'description' }, placeholder: 'Description', class: 'fr-input', id: "geo_area_#{geo_area.id}_description"
- else
= link_to '#', data: { action: 'geo-area#onClick' } do
= geo_area.label
- if geo_area.description.present?
%span
= geo_area.description