Browse Source

update settings

develop
Simon Vieille 2 weeks ago
parent
commit
75e3c4b065
  1. 14
      src/EventSuscriber/SettingEventSubscriber.php
  2. 2
      templates/base.html.twig

14
src/EventSuscriber/SettingEventSubscriber.php

@ -32,6 +32,7 @@ class SettingEventSubscriber extends EventSubscriber
$this->manager->init('email_comment', '🤖 E-mail', 'Destinataire nouveau commentaire', '');
$this->manager->init('stats_umami_url', '📊 Statistiques', 'Adresse tableau de bord Umami', '');
$this->manager->init('stats_umami_tag', '📊 Statistiques', 'Script Umami', '');
$this->manager->init('giphy_api_key', '🌐 API', 'Clé d\'API Giphy', '');
}
@ -62,6 +63,19 @@ class SettingEventSubscriber extends EventSubscriber
);
}
if (in_array($entity->getCode(), ['stats_umami_tag'])) {
$builder->add(
'value',
TextareaType::class,
[
'label' => $entity->getLabel(),
'attr' => [
'rows' => 3,
],
]
);
}
if (in_array($entity->getCode(), ['blog_footer'])) {
$builder->add(
'value',

2
templates/base.html.twig

@ -118,7 +118,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{{ encore_entry_script_tags('app') }}
{% endblock %}
<script async defer data-website-id="b0f9d177-4c9b-446c-82f2-aa45d4ae3aca" src="https://umami.deblan.org/umami.js"></script>
{{- setting('stats_umami_tag')|raw -}}
</body>
</html>
{% endapply %}
Loading…
Cancel
Save