demarches-normaliennes/app/views/champs/piece_justificative/show.turbo_stream.haml

7 lines
381 B
Text

= fields_for @champ.input_name, @champ do |form|
= turbo_stream.morph @champ.input_group_id do
= render EditableChamp::EditableChampComponent.new champ: @champ, form: form
- if @champ.piece_justificative_file.attached?
- attachment = @champ.piece_justificative_file.attachment
= turbo_stream.focus_all "button[data-toggle-target=\".attachment-input-#{attachment.id}\"]"