2018-10-09 11:43:51 +02:00
|
|
|
.motivation.hidden{ class: popup_class }
|
2017-11-29 11:47:18 +01:00
|
|
|
%h3
|
2017-12-12 14:51:44 +01:00
|
|
|
%span.icon{ class: popup_class }
|
2017-12-21 15:29:29 +01:00
|
|
|
#{popup_title}
|
2017-11-29 11:47:18 +01:00
|
|
|
|
2018-09-13 17:13:09 +02:00
|
|
|
= form_tag(terminer_gestionnaire_dossier_path(dossier.procedure, dossier), remote: true, method: :post, class: 'form') do
|
2017-11-29 11:47:18 +01:00
|
|
|
- if title == 'Accepter'
|
2018-12-14 19:51:33 +01:00
|
|
|
= text_area :dossier, :motivation, class: 'motivation-text-area', placeholder: placeholder, required: false
|
2017-11-29 11:47:18 +01:00
|
|
|
%p.help
|
|
|
|
L'acceptation du dossier envoie automatiquement une attestation à l'usager.
|
2018-04-06 13:09:37 +02:00
|
|
|
|
|
|
|
- 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_champs, unspecified_annotations_privees = 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
|
2018-08-09 16:56:51 +02:00
|
|
|
- else
|
2018-12-14 19:51:33 +01:00
|
|
|
= text_area :dossier, :motivation, class: 'motivation-text-area', placeholder: placeholder, required: true
|
2017-11-29 11:47:18 +01:00
|
|
|
.text-right
|
2019-01-18 14:20:30 +01:00
|
|
|
- if title == 'Accepter' && dossier.procedure.attestation_template&.activated?
|
2019-03-05 18:16:13 +01:00
|
|
|
= link_to "Voir l'attestation", apercu_attestation_gestionnaire_dossier_path(dossier.procedure, dossier), target: '_blank', rel: 'noopener', class: 'button', title: "Voir l'attestation qui sera envoyée au demandeur"
|
2018-02-28 16:07:52 +01:00
|
|
|
%span.button{ onclick: 'DS.motivationCancel();' } Annuler
|
2017-11-29 11:47:18 +01:00
|
|
|
= button_tag 'Valider la décision', name: :process_action, value: process_action, class: 'button primary', title: title, data: { confirm: confirm }
|