aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client/templates/client/index.html6
-rw-r--r--client/views.py4
-rw-r--r--version.txt2
3 files changed, 9 insertions, 3 deletions
diff --git a/client/templates/client/index.html b/client/templates/client/index.html
index 8086ed5..8dd3dde 100644
--- a/client/templates/client/index.html
+++ b/client/templates/client/index.html
@@ -429,7 +429,11 @@
{% if data.3 %}
<div class="row">
<div class="col s12">
- <p class="red lighten-1">I dati per questa persona non sono completi. Per poter creare una nuova iscrizione completare tutti i dati.</p>
+ <p class="red lighten-1">I dati per questa persona non sono completi.<br>
+ {% if data.4 %}
+ Uno o piĆ¹ allegati medici (certificato di vacinazione o tessera della cassa malati) non sono stati aggiunti.<br>
+ {% endif %}
+ Per poter creare una nuova iscrizione completare tutti i dati.</p>
</div>
</div>
{% else %}
diff --git a/client/views.py b/client/views.py
index b0029f0..01cb43e 100644
--- a/client/views.py
+++ b/client/views.py
@@ -112,7 +112,9 @@ def index(request):
data = [uc.__dict__[key] for key in required_fields]
data += [uc.medic.__dict__[key] for key in required_medic_fields]
invalid_flag = ("" in data) or (None in data) or (dt.date(1970, 1, 1) in data)
- docs.append([uc, documents, color, invalid_flag])
+ no_attachment_flag = (not uc.medic.vac_certificate) or (not uc.medic.health_care_certificate)
+ invalid_flag = invalid_flag or no_attachment_flag
+ docs.append([uc, documents, color, invalid_flag, no_attachment_flag])
# show only docs of the user and non archived
vac_file = ["/server/media/", "/vac_certificate/doc"]
diff --git a/version.txt b/version.txt
index c7d2167..4b3a076 100644
--- a/version.txt
+++ b/version.txt
@@ -1,2 +1,2 @@
version=0.6
-rev=34
+rev=35