demarches-normaliennes/app/views/administrateurs/mail_templates/_form.html.haml

47 lines
2.5 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

= render Dsfr::InputComponent.new(form: f, attribute: :subject, input_type: :text_field, opts: {})
= render Dsfr::InputComponent.new(form: f, attribute: :rich_body, input_type: :rich_text_area, opts: { class: 'fr-mb-4vh'})
#tags-table.clearfix.fr-mt-3w{ 'data-controller': 'trix' }
%h2.fr-h3
Insérer une balise
= render Dsfr::AlertComponent.new(state: :info, title: "Balises sur le conditionnel", heading_level: 'h3') do |c|
- c.body do
Les balises pour les champs conditionnés ne sont pour le moment pas supportées.
%p.notice.fr-mt-3w
Copiez-collez les balises ci-dessous pour afficher automatiquement linformation souhaitée.
.head
.tag Balise
.description Description
.items
- tags.each do |tag|
.item
%code.tag
= "--#{tag[:libelle]}--"
.description
= tag[:description]
-# Disable accepting dropped images and traduce toolbar tooltips
:javascript
addEventListener('trix-file-accept', function(e) { e.preventDefault(); });
addEventListener("trix-initialize", function(e) {
document.querySelector('button[data-trix-attribute="bold"]').setAttribute('title', 'Gras');
document.querySelector('button[data-trix-attribute="italic"]').setAttribute('title', 'Italique');
document.querySelector('button[data-trix-attribute="strike"]').setAttribute('title', 'Barrer');
document.querySelector('button[data-trix-attribute="href"]').setAttribute('title', 'Créer lien');
document.querySelector('button[data-trix-attribute="heading1"]').setAttribute('title', 'Titre');
document.querySelector('button[data-trix-attribute="quote"]').setAttribute('title', 'Citation');
document.querySelector('button[data-trix-attribute="bullet"]').setAttribute('title', 'Liste à puce');
document.querySelector('button[data-trix-attribute="number"]').setAttribute('title', 'Liste numérotée');
document.querySelector('button[data-trix-action="increaseNestingLevel"]').setAttribute('title', 'Indenter');
document.querySelector('button[data-trix-action="decreaseNestingLevel"]').setAttribute('title', 'Désindenter');
document.querySelector('button[data-trix-action="undo"]').setAttribute('title', 'Annuler la modification');
document.querySelector('button[data-trix-action="redo"]').setAttribute('title', 'Appliquer à nouveau la modification');
document.querySelector('.trix-button.trix-button--dialog[data-trix-method="setAttribute"]').value = "Créer lien";
document.querySelector('.trix-button.trix-button--dialog[data-trix-method="removeAttribute"]').value = "Effacer lien";
})