diff --git a/templates/questions/create.html b/templates/questions/create.html index 629c20981..08df385d7 100644 --- a/templates/questions/create.html +++ b/templates/questions/create.html @@ -1,8 +1,9 @@ {% extends "layouts/base.html" %} -{% load django_bootstrap5 %} +{% load static django_bootstrap5 %} {% block extra_css %} {{ form.media.css }} + {% endblock %} {% block breadcrumbs %} @@ -23,15 +24,34 @@ {% block content %}
-
+ {% csrf_token %}
{% bootstrap_form form alert_error_type="all" %}
+
+
L'ajout de l'image d'explication se fait Ă  la fin du formulaire đŸ‘‡
+
+
+ +
+ + +
+
+
+ {# {{ form.answer_image_url.as_hidden }} #} + + {% include "includes/_s3_upload_form.html" with dropzone_form_id="image_form" %} +
+ Image trop grosse ? outil pour réduire sa taille : tinypng.com +
+
+
{% bootstrap_button button_type="submit" button_class="btn-primary" content="Ajouter" %} @@ -43,6 +63,20 @@
{% endblock %} + {% block extra_js %} {{ form.media.js }} + + +{{ s3_form_values|json_script:"s3-form-values-question-image" }} +{{ s3_upload_config|json_script:"s3-upload-config-question-image" }} + {% endblock %} diff --git a/templates/questions/detail_edit.html b/templates/questions/detail_edit.html index 220cb2076..dc7ae4abc 100644 --- a/templates/questions/detail_edit.html +++ b/templates/questions/detail_edit.html @@ -2,6 +2,7 @@ {% load static django_bootstrap5 %} {% block extra_css %} +{{ form.media.css }} {% endblock %} @@ -21,12 +22,14 @@
+
+
{# {{ form.answer_image_url.as_hidden }} #} - + {% include "includes/_s3_upload_form.html" with dropzone_form_id="image_form" %}
Image trop grosse ? outil pour réduire sa taille : tinypng.com @@ -45,6 +48,8 @@
+
+
{% bootstrap_button button_type="submit" button_class="btn-primary" content="Sauvegarder" %} diff --git a/templates/quizs/create.html b/templates/quizs/create.html index 0291f511e..c596b916a 100644 --- a/templates/quizs/create.html +++ b/templates/quizs/create.html @@ -1,8 +1,9 @@ {% extends "layouts/base.html" %} -{% load django_bootstrap5 %} +{% load static django_bootstrap5 %} {% block extra_css %} {{ form.media.css }} + {% endblock %} {% block breadcrumbs %} @@ -23,15 +24,34 @@ {% block content %}
- + {% csrf_token %}
{% bootstrap_form form alert_error_type="all" %}
+
+
L'ajout d'une image se fait Ă  la fin du formulaire đŸ‘‡
+
+
+ + +
+
+
+ {# {{ form.image_background_url.as_hidden }} #} + + {% include "includes/_s3_upload_form.html" with dropzone_form_id="image_form" %} +
+ Image trop grosse ? outil pour réduire sa taille : tinypng.com +
+
+ +
+
{% bootstrap_button button_type="submit" button_class="btn-primary" content="Ajouter" %} @@ -45,4 +65,17 @@ {% block extra_js %} {{ form.media.js }} + + +{{ s3_form_values|json_script:"s3-form-values-quiz-image" }} +{{ s3_upload_config|json_script:"s3-upload-config-quiz-image" }} + {% endblock %} diff --git a/templates/quizs/detail_edit.html b/templates/quizs/detail_edit.html index 664de1f0f..0cfaed79e 100644 --- a/templates/quizs/detail_edit.html +++ b/templates/quizs/detail_edit.html @@ -2,6 +2,7 @@ {% load static django_bootstrap5 %} {% block extra_css %} +{{ form.media.css }} {% endblock %} @@ -28,7 +29,7 @@
{# {{ form.image_background_url.as_hidden }} #} - + {% include "includes/_s3_upload_form.html" with dropzone_form_id="image_form" %}
Image trop grosse ? outil pour réduire sa taille : tinypng.com