2018-04-03 14:22:53 +02:00
|
|
|
|
= render partial: 'admin/closed_mail_template_attestation_inconsistency_alert'
|
2017-06-09 13:28:47 +02:00
|
|
|
|
#attestation-template-edit.row.white-back
|
|
|
|
|
= form_for @attestation_template, url: admin_procedure_attestation_template_path do |f|
|
|
|
|
|
.row
|
|
|
|
|
.col-md-10
|
|
|
|
|
%h1
|
|
|
|
|
Attestation
|
|
|
|
|
- if @attestation_template.activated?
|
|
|
|
|
%small.text-success Activée
|
|
|
|
|
- else
|
|
|
|
|
%small Désactivée
|
|
|
|
|
|
2019-02-15 19:35:50 +01:00
|
|
|
|
%p.notice
|
|
|
|
|
L’attestation, si elle est activée, est émise au moment où un dossier est accepté.
|
|
|
|
|
%br
|
|
|
|
|
L’email d’accusé d’acceptation envoyé à l’usager comporte alors un lien vers l’attestation ;
|
|
|
|
|
celle-ci est également disponible au téléchargement depuis l’espace personnel de l’usager.
|
2017-06-09 13:28:47 +02:00
|
|
|
|
|
|
|
|
|
.image-upload
|
|
|
|
|
- if @attestation_template.logo.present?
|
|
|
|
|
= image_tag @attestation_template.logo.url, class: 'thumbnail'
|
|
|
|
|
.form-group
|
|
|
|
|
= f.label :logo, "Logo de l'attestation"
|
2018-09-24 10:13:46 +02:00
|
|
|
|
- if @attestation_template.logo.present?
|
|
|
|
|
= link_to 'Supprimer le logo', admin_procedure_attestation_template_logo_path(@procedure), method: :delete
|
2017-06-09 13:28:47 +02:00
|
|
|
|
= f.file_field :logo, accept: 'image/png, image/jpg, image/jpeg'
|
|
|
|
|
%p.help-block
|
|
|
|
|
Fichier accepté : JPG / JPEG / PNG
|
|
|
|
|
%br
|
|
|
|
|
Dimensions conseillées : au minimum 500 px de largeur ou de hauteur, poids maximum : 0,5 Mo.
|
|
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
|
= f.label :title, 'Titre'
|
|
|
|
|
= f.text_field :title, class: 'form-control'
|
|
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
|
= f.label :body, 'Corps du document'
|
|
|
|
|
~ f.text_area :body, class: 'form-control', rows: 10
|
|
|
|
|
|
|
|
|
|
.row
|
|
|
|
|
.col-md-12.balises
|
|
|
|
|
%table.table.table-striped
|
|
|
|
|
%tr
|
|
|
|
|
%th.col-md-3
|
|
|
|
|
Balise
|
|
|
|
|
%th
|
|
|
|
|
Description
|
|
|
|
|
- @attestation_template.tags.each do |tag|
|
|
|
|
|
%tr
|
|
|
|
|
%td
|
2018-03-07 16:50:13 +01:00
|
|
|
|
%code{ style: "white-space: pre-wrap;" }
|
|
|
|
|
= "--#{tag[:libelle]}--"
|
2017-06-09 13:28:47 +02:00
|
|
|
|
%td
|
|
|
|
|
= tag[:description]
|
|
|
|
|
|
|
|
|
|
.image-upload
|
|
|
|
|
- if @attestation_template.signature.present?
|
|
|
|
|
= image_tag @attestation_template.signature.url, class: 'thumbnail'
|
|
|
|
|
.form-group
|
|
|
|
|
= f.label :signature, "Tampon de l'attestation"
|
2018-09-24 10:13:30 +02:00
|
|
|
|
- if @attestation_template.signature.present?
|
|
|
|
|
= link_to 'Supprimer le tampon', admin_procedure_attestation_template_signature_path(@procedure), method: :delete
|
2017-06-09 13:28:47 +02:00
|
|
|
|
= f.file_field :signature, accept: 'image/png, image/jpg, image/jpeg'
|
|
|
|
|
%p.help-block
|
|
|
|
|
Fichier accepté : JPG / JPEG / PNG
|
|
|
|
|
%br
|
|
|
|
|
Dimensions conseillées : au minimum 500 px de largeur ou de hauteur, poids maximum : 0,5 Mo.
|
|
|
|
|
|
|
|
|
|
.form-group
|
2017-12-18 17:57:47 +01:00
|
|
|
|
= f.label :footer, 'Pied de page'
|
2017-06-27 13:07:06 +02:00
|
|
|
|
= f.text_field :footer, class: 'form-control', maxlength: 190
|
2017-06-09 13:28:47 +02:00
|
|
|
|
|
2019-01-17 17:30:54 +01:00
|
|
|
|
- if @attestation_template.activated && @procedure.locked?
|
|
|
|
|
.row
|
|
|
|
|
.col-md-12
|
|
|
|
|
.pull-right
|
|
|
|
|
%p.help-block L’attestation ne peut plus être désactivée car la démarche a déjà été publiée.
|
|
|
|
|
|
2017-05-31 17:39:15 +02:00
|
|
|
|
%button.btn.btn-primary{ formaction: admin_procedure_attestation_template_preview_path, formtarget: '_blank' } Prévisualiser
|
|
|
|
|
|
2017-06-09 13:28:47 +02:00
|
|
|
|
.pull-right
|
2017-06-30 12:59:53 +02:00
|
|
|
|
- if @attestation_template.activated && !@procedure.locked?
|
2017-06-09 13:28:47 +02:00
|
|
|
|
%button.btn.btn-warning{ formaction: admin_procedure_attestation_template_disactivate_path } désactiver l'attestation
|
|
|
|
|
|
2017-06-30 12:59:12 +02:00
|
|
|
|
- if @attestation_template.new_record? || !@attestation_template.activated
|
2017-06-09 13:28:47 +02:00
|
|
|
|
%button.btn.btn-success Activer l'attestation
|
|
|
|
|
- else
|
2017-06-30 12:59:53 +02:00
|
|
|
|
- save_data = @procedure.locked? ? { toggle: :tooltip, confirm: "Attention: les modifications n'affecteront pas les attestations déjà délivrées." } : nil
|
|
|
|
|
%button.btn.btn-success{ data: save_data } Enregistrer
|