From 26fb6c43a27c014383127d0e4b3fb29f8b923690 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Sat, 20 Jun 2020 23:32:55 +0200 Subject: Doc, doctypes, users all done --- client/templates/client/doc_create.html | 8 +-- client/templates/client/doc_edit.html | 86 ++++++++++++++++++++++++++++ client/templates/client/index.html | 99 +++++++++++++++++++++++++-------- 3 files changed, 167 insertions(+), 26 deletions(-) create mode 100644 client/templates/client/doc_edit.html (limited to 'client/templates') diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html index 550eb54..39deb2d 100644 --- a/client/templates/client/doc_create.html +++ b/client/templates/client/doc_create.html @@ -1,6 +1,6 @@ {% extends 'registration/base.html' %} -{% block title %}Admin - Modifica Tipo{% endblock %} +{% block title %}Crea Documento{% endblock %} {% block nav %} Home @@ -46,14 +46,14 @@ {% if personal_data %}
{% endif %} {% if medical_data %}
{% endif %} @@ -68,7 +68,7 @@ {% for key in keys %}
- +
diff --git a/client/templates/client/doc_edit.html b/client/templates/client/doc_edit.html new file mode 100644 index 0000000..8cd5a98 --- /dev/null +++ b/client/templates/client/doc_edit.html @@ -0,0 +1,86 @@ +{% extends 'registration/base.html' %} + +{% block title %}Modifica documento{% endblock %} + +{% block nav %} + Home + Modifica Documento +{% endblock %} + +{% block content %} +
+
+
+
+
+ {% csrf_token %} + +
+
+ + +
+
+ {% if personal_data %} + + {% endif %} + {% if medical_data %} + + {% endif %} + {% if custom_message %} + + {% endif %} + {% if custom_data %} + {% for key in keys %} +
+
+ + +
+
+ {% endfor %} + {% endif %} + +
+
+
+
+
+{% endblock %} + +{% block script %} +$(document).ready(function(){ + $('select').formSelect(); + {% if error %} + M.toast({html: '{{ error_text}}', classes: 'orange'}) + {% endif %} + }); +function send(id) { + var form = document.getElementById('form') + form.submit() +} +{% endblock %} \ No newline at end of file diff --git a/client/templates/client/index.html b/client/templates/client/index.html index 96179b2..733f62f 100644 --- a/client/templates/client/index.html +++ b/client/templates/client/index.html @@ -13,6 +13,12 @@

Usa questo bottone per creare un nuovo documento

+ +
+ {% csrf_token %} + +
+ {% if user.is_authenticated %} {% if user.is_staff or perms.client.approved %} {% if not empty %} @@ -24,40 +30,83 @@ timelapse {% elif doc.0.status == "ok" %} check + {% elif doc.0.status == "autosign" %} + assignment_turned_in {% endif %} {{doc.0.document_type.name}} - {{doc.0.compilation_date}} + {{doc.0.compilation_date}}
{% if doc.0.status == "wait" %} - file_download Scarica documento per approvazione - delete Elimina documento - edit Modifica documento + file_download Scarica documento per approvazione + delete Elimina documento + edit Modifica documento +
+
+ {% elif doc.0.status == "autosign" %} + checkApprova documento + delete Elimina documento + edit Modifica documento

{% endif %} +
    {% if doc.0.document_type.personal_data %} - person +
  • +
    + personDati personali +
    +
    + + + {% for field in doc.2 %} + + + + {% endfor %} + +
    {{field}}
    +
    +
  • {% endif %} {% if doc.0.document_type.medical_data %} - healing +
  • +
    + healingDati medici +
    +
    + + + {% for field in doc.3 %} + + + + {% endfor %} + +
    {{field}}
    +
    +
  • {% endif %} {% if doc.0.document_type.custom_data %} - add_circle_outline - {% endif %} - {% if doc.0.document_type.custom_data %} -
    - - - {% for key in doc.1 %} - - - - - {% endfor %} - -
    {{key.key}}{{key.value}}
    +
  • +
    + add_circle_outlineDati aggiuntivi +
    +
    + + + {% for key in doc.1 %} + + + + + {% endfor %} + +
    {{key.key}}{{key.value}}
    +
    +
  • {% endif %} +
{% endfor %} @@ -73,7 +122,7 @@
-

Il tuo utente non e` ancora stato approvato.

+

Il tuo utente non è ancora stato approvato.

Come farsi approvare l'utente @@ -87,7 +136,7 @@
-

Se hai gia` un account clicca login in alto a destra. Altrimenti clicca registrazione

+

Se hai già un account clicca login in alto a destra. Altrimenti clicca registrazione

@@ -108,4 +157,10 @@ $('*').click(function(event) { $('.tap-target').tapTarget('close'); } }); +function send(id) { + var form = document.getElementById('form') + var action = document.getElementById('action') + action.setAttribute('value', id); + form.submit() +} {% endblock %} \ No newline at end of file -- cgit v1.2.1