aboutsummaryrefslogtreecommitdiffstats
path: root/accounts
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2023-09-25 21:08:33 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2023-09-25 21:08:33 +0200
commit60d64abc9e0d517d042584bbea17bb34913ea406 (patch)
tree71c40e043991328cc5bf7b2f1f14cc8153af0bc1 /accounts
parentcheck for files based on branca and not group (diff)
downloadscout-subs-60d64abc9e0d517d042584bbea17bb34913ea406.tar.gz
scout-subs-60d64abc9e0d517d042584bbea17bb34913ea406.zip
fix not showing errors for date pickers
Diffstat (limited to 'accounts')
-rw-r--r--accounts/templates/accounts/user_edit.html4
-rw-r--r--accounts/views.py3
2 files changed, 2 insertions, 5 deletions
diff --git a/accounts/templates/accounts/user_edit.html b/accounts/templates/accounts/user_edit.html
index 2c0c8f4..3c4cada 100644
--- a/accounts/templates/accounts/user_edit.html
+++ b/accounts/templates/accounts/user_edit.html
@@ -37,7 +37,7 @@
<span class="helper-text" data-error="Campo richiesto"></span>
</div>
<div class="input-field col l4 s12">
- <input name="birth_date" value="{{birth_date}}" class="datepicker" id="birth_date" type="text" {{validation_dic.birth_date|safe}} {{midata_disable}}>
+ <input name="birth_date" value="{{birth_date}}" id="birth_date" type="text" {{validation_dic.birth_date|safe}} {{midata_disable}}>
<label for="birth_date">Data di nascita</label>
<span class="helper-text" data-error="Campo richiesto"></span>
</div>
@@ -216,7 +216,7 @@
<span class="helper-text" data-error="Campo richiesto"></span>
</div>
<div class="input-field col l4 s12">
- <input value="{{tetanus_date}}" name="tetanus_date" id="tetanus_date" class="datepicker" type="text" {{validation_dic.tetanus_date|safe}}>
+ <input value="{{tetanus_date}}" name="tetanus_date" id="tetanus_date" type="text" {{validation_dic.tetanus_date|safe}}>
<label for="tetanus_date">Ultima vacinazione contro il tetano</label>
<span class="helper-text" data-error="Campo richiesto"></span>
</div>
diff --git a/accounts/views.py b/accounts/views.py
index dc53660..f04f495 100644
--- a/accounts/views.py
+++ b/accounts/views.py
@@ -573,7 +573,6 @@ def edit(request, code):
if request.POST["tetanus_date"] == "" or request.POST["tetanus_date"].lower() == "01 gennaio 1970" or request.POST["tetanus_date"] == "None" or request.POST["tetanus_date"] == "Giovedì 01 Gennaio 1970 00:00":
validation_dic["tetanus_date"] = 'class="datepicker validate invalid" required="" aria-required="true"'
missing_fields = True
- print("missing!!")
else:
validation_dic["tetanus_date"] = 'class="datepicker validate" required="" aria-required="true"'
print("not missing")
@@ -588,8 +587,6 @@ def edit(request, code):
if missing_fields:
errors.append("Alcuni campi richiesti non sono stati compilati")
- print(validation_dic)
-
# check if user uploaded a file
if "vac_certificate" in request.FILES:
files = request.FILES.getlist('vac_certificate')