aboutsummaryrefslogtreecommitdiffstats
path: root/client/views.py
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-07-21 21:47:09 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-07-21 21:47:09 +0200
commita531c5e12a65ac7c216bb3f91e510c1d31fbb06e (patch)
treec306bfc36f54815759cfe4b15b8f296865e2b70e /client/views.py
parentmodify gitignore (diff)
downloadscout-subs-a531c5e12a65ac7c216bb3f91e510c1d31fbb06e.tar.gz
scout-subs-a531c5e12a65ac7c216bb3f91e510c1d31fbb06e.zip
static files, last improvements0.1
Diffstat (limited to 'client/views.py')
-rw-r--r--client/views.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/client/views.py b/client/views.py
index f215e7e..6cc7a15 100644
--- a/client/views.py
+++ b/client/views.py
@@ -36,6 +36,9 @@ def index(request):
if document.user != request.user:
return
+ if document.status == "ok" or document.status == "archive":
+ return
+
if request.POST["action"][0] == 'f':
template = get_template('client/approve_doc_pdf.html')
context = {'doc': document}
@@ -46,8 +49,9 @@ def index(request):
return FileResponse(result, as_attachment=True, filename=document.document_type.name+".pdf")
elif request.POST["action"][0] == 'a':
- document.status = "ok"
- document.save()
+ if document.status == "autosign":
+ document.status = "ok"
+ document.save()
elif request.POST["action"][0] == 'd':
document.delete()
elif request.POST["action"][0] == 'e':
@@ -73,6 +77,8 @@ def index(request):
for i in documents:
personal = None
medical = None
+ vac_file = ""
+ health_file = ""
if i.document_type.personal_data:
personal = i.personal_data
if i.document_type.medical_data: