- if @attestation_template.previously_new_record? || @attestation_template.state_changed? = turbo_stream.update "fixed_footer", render(partial: "fixed_footer", locals: { procedure: @procedure, attestation_template: @attestation_template }) = turbo_stream.update "sticky-header", render(partial: "sticky_header") = turbo_stream.show 'autosave-notice' = turbo_stream.replace 'autosave-notice', render(partial: 'administrateurs/autosave_notice', locals: { success: !@attestation_template.changed? }) = turbo_stream.hide 'autosave-notice', delay: 15000 - if @attestation_template.logo_blob&.previously_new_record? = turbo_stream.update dom_id(@attestation_template, :logo_attachment) do = render(Attachment::EditComponent.new(attached_file: @attestation_template.logo, direct_upload: false)) - if @attestation_template.signature_blob&.previously_new_record? = turbo_stream.update dom_id(@attestation_template, :signature_attachment) do = render(Attachment::EditComponent.new(attached_file: @attestation_template.signature, direct_upload: false)) - body_id = "attestation-template-json-body-messages" - if @attestation_template.errors.include?(:json_body) = turbo_stream.update body_id do = render partial: "shared/errors_list", locals: { object: @attestation_template, attribute: :json_body } = turbo_stream.show body_id - else = turbo_stream.hide body_id = turbo_stream.update body_id, nil