demarches-normaliennes/app/views/attachments/destroy.turbo_stream.haml

10 lines
486 B
Text
Raw Normal View History

2024-06-27 14:05:48 +02:00
- if @champ
= fields_for @champ.input_name, @champ do |form|
= turbo_stream.replace @champ.input_group_id do
= render EditableChamp::EditableChampComponent.new champ: @champ, form: form
2024-06-27 15:19:51 +02:00
= turbo_stream.focus_all "#attachment-multiple-empty-#{@champ.public_id} input"
- else
= turbo_stream.replace dom_id(@attachment, :edit) do
= render Attachment::EditComponent.new(**@attachment_options)
= turbo_stream.focus_all "##{dom_id(@attachment.record, @attachment.name)}"