demarches-normaliennes/app/views/admin/mail_templates/edit.html.haml
Judith 782706537d Changed the routes to pass all new design admin pages under
'new_administrateur' scope, except 'services'.
As a result, the url of these pages will all include '/admin'.
2020-07-07 14:08:01 +00:00

40 lines
1.5 KiB
Text

- if params[:id] == 'closed_mail'
= render partial: 'admin/closed_mail_template_attestation_inconsistency_alert'
.white-back
%h3
= @mail_template.class.const_get(:DISPLAYED_NAME)
= form_for @mail_template,
as: 'mail_template',
url: admin_procedure_mail_template_path(@procedure, @mail_template.class.const_get(:SLUG)),
method: :put do |f|
.row
.col-md-6
.form-group.string.optional.mail_template_subject
= f.label :subject, "Objet de l'email", class: 'control-label string optional'
= f.text_field :subject, class: 'form-control string optional'
.form-group.text.optional.mail_template_body
= f.label :body, "Corps de l'email", class: 'control-label string optional'
= f.text_area :body, class: 'wysihtml5 form-control text optional'
.text-right
= link_to "Annuler", admin_procedure_mail_templates_path(@procedure), class: "btn btn-default"
= f.submit 'Mettre à jour', class: "btn btn-default btn-success"
= link_to "Prévisualiser", preview_admin_procedure_mail_template_path(@procedure, @mail_template.class.const_get(:SLUG)), class: "btn btn-primary", target: "_blank"
.row
.col-md-12
%table.table
%tr
%th.col-md-3
Balise
%th
Description
- @mail_template.tags.each do |tag|
%tr
%td
%code{ style: "white-space: pre-wrap;" }
= "--#{tag[:libelle]}--"
%td
= tag[:description]