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

11 lines
584 B
Text

= fields_for @champ.input_name, @champ do |form|
= turbo_stream.replace @champ.input_group_id do
= render EditableChamp::EditableChampComponent.new champ: @champ, form: form
- last_attached_file = @champ.piece_justificative_file.attachments.last
- if last_attached_file
= turbo_stream.focus_all "#persisted_row_attachment_#{last_attached_file.id} .attachment-filename a"
- if @champ.dossier.editing_fork?
= turbo_stream.replace_all '.dossier-edit-sticky-footer' do
= render Dossiers::EditFooterComponent.new(dossier: @champ.dossier, annotation: @champ.private?)