.motivation.hidden{ class: popup_class } = form_tag(terminer_instructeur_dossier_path(dossier.procedure, dossier), data: { turbo: true, turbo_confirm: confirm }, method: :post, multipart: true) do - if title == 'Accepter' = text_area :dossier, :motivation, class: 'fr-input', placeholder: placeholder, required: false - if dossier.attestation_template&.activated? %p.help L’acceptation du dossier envoie automatiquement = link_to 'une attestation', apercu_attestation_instructeur_dossier_path(dossier.procedure, dossier), target: '_blank', rel: 'noopener', title: "Voir l'attestation qui sera envoyée à l'usager" à l'usager. - unspecified_attestation_champs = dossier.unspecified_attestation_champs - if unspecified_attestation_champs.present? .warning Attention, les valeurs suivantes n’ont pas été renseignées mais sont nécessaires pour pouvoir envoyer une attestation valide : - unspecified_annotations_privees, unspecified_champs = unspecified_attestation_champs.partition(&:private) - if unspecified_champs.present? %h4 Champs de la demande %ul - unspecified_attestation_champs.each do |unspecified_champ| %li= unspecified_champ.libelle - if unspecified_annotations_privees.present? %h4 Annotations privées %ul - unspecified_annotations_privees.each do |unspecified_annotations_privee| %li= unspecified_annotations_privee.libelle - else = text_area :dossier, :motivation, class: 'fr-input', placeholder: placeholder, required: true .optional-justificatif{ id: "justificatif_motivation_suggest_#{popup_class}", onclick: "DS.showImportJustificatif('#{popup_class}');" } .fr-btn.fr-btn--tertiary-no-outline.fr-btn--icon-left.fr-icon-attachment-line.fr-ml-0 Ajouter un justificatif (optionnel) .hidden{ id: "justificatif_motivation_import_#{popup_class}" } = file_field :dossier, :justificatif_motivation, direct_upload: true .text-right.fr-mt-2w %span.fr-btn.fr-btn--secondary{ onclick: 'DS.motivationCancel();' } Annuler = button_tag 'Valider la décision', name: :process_action, value: process_action, class: 'fr-btn fr-mr-0', title: title