aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server/templates/server/download_doc.html67
-rw-r--r--server/views.py2
2 files changed, 32 insertions, 37 deletions
diff --git a/server/templates/server/download_doc.html b/server/templates/server/download_doc.html
index 35cbb13..3098fe0 100644
--- a/server/templates/server/download_doc.html
+++ b/server/templates/server/download_doc.html
@@ -36,59 +36,59 @@
<br><br>
<div class="row">
<div class="input-field col l4 s12">
- <input value="{{doc.0.user.first_name}}" id="first_name" type="text" >
+ <input placeholder=" " value="{{doc.0.user.first_name}}" id="first_name" type="text" >
<label for="first_name">Nome</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.0.user.last_name}}" id="last_name" type="text" >
+ <input placeholder=" " value="{{doc.0.user.last_name}}" id="last_name" type="text" >
<label for="last_name">Cognome</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.2.born_date}}" id="birth_date" type="text">
+ <input placeholder=" " value="{{doc.2.born_date}}" id="birth_date" type="text">
<label for="birth_date">Data di nascita</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.4}}" id="branca" type="text">
+ <input placeholder=" " value="{{doc.4}}" id="branca" type="text">
<label for="branca">Branca</label>
</div>
<div class="input-field col l8 s12">
- <input value="{{doc.2.parent_name}}" id="parent_name" type="text" >
+ <input placeholder=" " value="{{doc.2.parent_name}}" id="parent_name" type="text" >
<label for="parent_name">Nome dei genitori</label>
</div>
<div class="input-field col l12 s12">
- <input value="{{doc.2.via}}" id="via" type="text" >
+ <input placeholder=" " value="{{doc.2.via}}" id="via" type="text" >
<label for="via">Via e numero</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.2.cap}}" name="cap" id="cap" type="text" >
+ <input placeholder=" " value="{{doc.2.cap}}" name="cap" id="cap" type="text" >
<label for="cap">CAP</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.2.country}}" name="country" id="country" type="text" >
+ <input placeholder=" " value="{{doc.2.country}}" name="country" id="country" type="text" >
<label for="country">Paese</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.2.nationality}}" name="nationality" id="nationality" type="text" >
+ <input placeholder=" " value="{{doc.2.nationality}}" name="nationality" id="nationality" type="text" >
<label for="nationality">Nazionalit&agrave;</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.2.phone}}" name="phone" id="phone" type="text" >
+ <input placeholder=" " value="{{doc.2.phone}}" name="phone" id="phone" type="text" >
<label for="phone">Cellulare</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.2.home_phone}}" name="home_phone" id="home_phone" type="text" >
+ <input placeholder=" " value="{{doc.2.home_phone}}" name="home_phone" id="home_phone" type="text" >
<label for="home_phone">Telefono di casa</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.2.email}}" name="email" id="email" type="text" >
+ <input placeholder=" " value="{{doc.2.email}}" name="email" id="email" type="text" >
<label for="email">Email</label>
</div>
<div class="input-field col l8 s12">
- <input value="{{doc.2.school}}" name="school" id="school" type="text" >
+ <input placeholder=" " value="{{doc.2.school}}" name="school" id="school" type="text" >
<label for="school">Scuola frequentata</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.2.year}}" name="year" id="year" type="text" >
+ <input placeholder=" " value="{{doc.2.year}}" name="year" id="year" type="text" >
<label for="year">Classe</label>
</div>
</div>
@@ -105,23 +105,23 @@
</div>
<div class="row">
<div class="input-field col l6 s12">
- <input name="emer_name" value="{{doc.3.emer_name}}" id="emer_name" type="text" >
+ <input placeholder=" " name="emer_name" value="{{doc.3.emer_name}}" id="emer_name" type="text" >
<label for="emer_name">Nome e cognome</label>
</div>
<div class="input-field col l3 s12">
- <input name="emer_relative" value="{{doc.3.emer_relative}}" id="emer_relative" type="text" >
+ <input placeholder=" " name="emer_relative" value="{{doc.3.emer_relative}}" id="emer_relative" type="text" >
<label for="emer_releative">Parentela</label>
</div>
<div class="input-field col l3 s12">
- <input name="cell_phone" value="{{doc.3.cell_phone}}" id="cellphone" type="text" >
+ <input placeholder=" " name="cell_phone" value="{{doc.3.cell_phone}}" id="cellphone" type="text" >
<label for="cell_phone">Cellulare</label>
</div>
<div class="input-field col l9 s12">
- <input value="{{doc.3.address}}" name="address" id="address" type="text" >
+ <input placeholder=" " value="{{doc.3.address}}" name="address" id="address" type="text" >
<label for="address">Indirizzo completo</label>
</div>
<div class="input-field col l3 s12">
- <input value="{{doc.3.emer_phone}}" name="emer_phone" id="emer_phone" type="text" >
+ <input placeholder=" " value="{{doc.3.emer_phone}}" name="emer_phone" id="emer_phone" type="text" >
<label for="emer_phone">Telefono di casa</label>
</div>
</div>
@@ -132,15 +132,15 @@
</div>
<div class="row">
<div class="input-field col l4 s12">
- <input value="{{doc.3.health_care}}" name="health_care" id="health_care" type="text" >
+ <input placeholder=" " value="{{doc.3.health_care}}" name="health_care" id="health_care" type="text" >
<label for="health_care">Cassa Malati</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.3.injuries}}" name="injuries" id="injuries" type="text" >
+ <input placeholder=" " value="{{doc.3.injuries}}" name="injuries" id="injuries" type="text" >
<label for="injuries">Infortuni</label>
</div>
<div class="input-field col l4 s12">
- <input value="{{doc.3.rc}}" name="rc" id="rc" type="text" >
+ <input placeholder=" " value="{{doc.3.rc}}" name="rc" id="rc" type="text" >
<label for="rc">Responsabilit&agrave; civile</label>
</div>
</div>
@@ -160,15 +160,15 @@
<h6>Medico di famiglia</h6>
</div>
<div class="input-field col l6 s12">
- <input value="{{doc.3.medic_name}}" name="medic_name" id="medic_name" type="text" >
+ <input placeholder=" " value="{{doc.3.medic_name}}" name="medic_name" id="medic_name" type="text" >
<label for="medic_name">Nome e cognome</label>
</div>
<div class="input-field col l6 s12">
- <input value="{{doc.3.medic_phone}}" name="medic_phone" id="medic_phone" type="text" >
+ <input placeholder=" " value="{{doc.3.medic_phone}}" name="medic_phone" id="medic_phone" type="text" >
<label for="medic_phone">Telefono studio</label>
</div>
<div class="input-field col l12 s12">
- <input value="{{doc.3.medic_address}}" name="medic_address" id="medic_address" type="text" >
+ <input placeholder=" " value="{{doc.3.medic_address}}" name="medic_address" id="medic_address" type="text" >
<label for="medic_address">Indirizzo completo</label>
</div>
</div>
@@ -177,19 +177,19 @@
<h6>Scheda medica personale</h6>
</div>
<div class="input-field col s12">
- <input value="{{doc.3.sickness}}" name="sickness" id="sickness" type="text">
+ <input placeholder=" " value="{{doc.3.sickness}}" name="sickness" id="sickness" type="text">
<label for="sickness">Principali malattie avute</label>
</div>
<div class="input-field col l8 s12">
- <input value="{{doc.3.vaccine}}" name="vaccine" id="vaccine" type="text">
+ <input placeholder=" " value="{{doc.3.vaccine}}" name="vaccine" id="vaccine" type="text">
<label for="vaccine">Vacinazioni fatte</label>
</div>
<div class="input-field col l4 s12">
<label for="tetanus_date">Ultima vacinazione contro il tetano</label>
- <input value="{{doc.3.tetanus_date}}" name="tetanus_date" id="tetanus_date" type="text">
+ <input placeholder=" " value="{{doc.3.tetanus_date}}" name="tetanus_date" id="tetanus_date" type="text">
</div>
<div class="input-field col s12">
- <input value="{{doc.3.allergy}}" name="allergy" id="allergy" type="text">
+ <input placeholder=" " value="{{doc.3.allergy}}" name="allergy" id="allergy" type="text">
<label for="allergy">Allergie particolari/Intolleraze alimentari</label>
</div>
<div class="switch col s12">
@@ -202,7 +202,7 @@
</label>
</div>
<div class="input-field col s12">
- <input value="{{doc.3.drugs}}" name="drugs" id="drugs" type="text">
+ <input placeholder=" " value="{{doc.3.drugs}}" name="drugs" id="drugs" type="text">
<label for="drugs">Se s&igrave; quali, in che dosi e prescrizioni</label>
</div>
<div class="switch col s12">
@@ -215,7 +215,7 @@
</label>
</div>
<div class="input-field col s12">
- <input value="{{doc.3.misc}}" name="misc" id="misc" type="text">
+ <input placeholder=" " value="{{doc.3.misc}}" name="misc" id="misc" type="text">
<label for="misc">Se s&igrave; quali</label>
</div>
</div>
@@ -275,9 +275,4 @@
</main>
</body>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
-<script>
- setTimeout(function(){
- window.status = "done";
-}, 2000);
-</script>
</html> \ No newline at end of file
diff --git a/server/views.py b/server/views.py
index ab22891..cdc1b74 100644
--- a/server/views.py
+++ b/server/views.py
@@ -221,7 +221,7 @@ def ulist(request):
# render context
html = template.render(context)
# render pdf using wkhtmltopdf
- pdf = pdfkit.from_string(html, False, options={"window-status":"done"})
+ pdf = pdfkit.from_string(html, False)
result = BytesIO(pdf)
result.seek(0)
return FileResponse(result, filename=document.user.username+"_"+document.document_type.name+".pdf")