From 15a57cbb39634b42bec54d9c88d20611e0780b31 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Sat, 6 Aug 2022 21:46:44 +0200 Subject: fix heading prefix and add custom param preview --- server/templates/server/doc_create.html | 7 ++ server/templates/server/doc_creation_preview.html | 121 ++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 server/templates/server/doc_creation_preview.html (limited to 'server/templates') diff --git a/server/templates/server/doc_create.html b/server/templates/server/doc_create.html index 43b98e9..908d1eb 100644 --- a/server/templates/server/doc_create.html +++ b/server/templates/server/doc_create.html @@ -149,6 +149,7 @@
+ Visualizza anteprima
@@ -196,4 +197,10 @@ $(document).ready(function(){ {% endif %} $('.modal').modal(); }); + +function preview() { + var param = document.getElementById("param").value; + var param_base64 = btoa(param); + window.open("{%url 'custom_parameters_preview' %}?param=" + param_base64); +} {% endblock %} \ No newline at end of file diff --git a/server/templates/server/doc_creation_preview.html b/server/templates/server/doc_creation_preview.html new file mode 100644 index 0000000..811b9ad --- /dev/null +++ b/server/templates/server/doc_creation_preview.html @@ -0,0 +1,121 @@ +{% extends 'registration/base_client.html' %} + +{% block title %}Preview iscrizione{% endblock %} + +{% block breadcrumb %} + Preview Iscrizione +{% endblock %} + +{% load app_filter %} + +{% block content %} +
+
+
+
+
+ + +
+
+
+
+
+
+

+ Il documento conterrà le informazioni personali, prego verificare che siano corrette e aggiornate +

+
+
+
+
+
+
+
+
+

+ Il documento conterrà le informazioni mediche, prego verificare che siano corrette e aggiornate +

+
+
+
+
+
+
+
+
+

+ Testo personalizzato d'esempio.
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan auctor lobortis. Etiam eu felis ac elit semper vestibulum. Praesent pharetra ex quam. Ut sed magna nec eros viverra blandit nec eget nisl. Cras maximus efficitur urna, eget semper dui commodo a. Fusce eros sem, condimentum eu dignissim eget, pharetra vulputate odio. +

+
+
+
+
+ {% for key in keys %} + {% if key.key_extra|is_heading %} +
+
+
{{key.key_extra|parse_heading}}
+
+
+ {% elif key.key_extra|is_multiple_choice %} +
+
+ {% with arr=key.key_extra|parse_multiple_choice %} + {{arr.0}} + {% for val in arr.1 %} +

+ {% endfor %} + {% endwith %} +
+
+ {% elif key.key_extra|is_checkbox %} + checkbox + {% else %} +
+
+ + +
+
+ {% endif %} + {% endfor %} +
+
+
+
+

+ Attenzione: il documento non sarĂ  valido fino a quando non viene approvato. Selezionare + il documento dalla pagina principale per approvarlo. +

+
+
+
+
+ +
+
+
+{% endblock %} + +{% block script %} +$(document).ready(function(){ + $('select').formSelect(); +}); +{% endblock %} \ No newline at end of file -- cgit v1.2.1