telecahrger pdf

This commit is contained in:
2021-10-15 14:06:55 +02:00
parent 69438938ce
commit b0ddad726e
2 changed files with 9 additions and 6 deletions
+1 -5
View File
@@ -45,11 +45,7 @@ form:
validate:
type: bool
.docu:
type: file
label: pdf à télécharger
accept:
- .pdf
.pdf:
type: filepicker
label: pdf à télécharger
@@ -9,8 +9,15 @@
{{ content|raw }}
<div class="boutons-event">
{% for button in page.header.buttons %}
<a class="bouton{% if button.primary %} primary{% endif %}" href="{{ button.url }}" target="_blank">{{ button.text }}</a>
{% if button.url %}
<a class="bouton {% if button.primary %} primary{% endif %}" href="{{ button.url }}" target="_blank">{{ button.text }}>
{% endif %}
{% if button.pdf %}
<a class="bouton {% if button.primary %} primary{% endif %}" href="{{page.media[button.pdf].url|e }}" download >{{ button.text }}>
{% endif %}
{% endfor %}
</div>
</div>