From 60d64abc9e0d517d042584bbea17bb34913ea406 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 25 Sep 2023 21:08:33 +0200 Subject: fix not showing errors for date pickers --- accounts/templates/accounts/user_edit.html | 4 ++-- accounts/views.py | 3 --- version.txt | 2 +- 3 files changed, 3 insertions(+), 6 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 @@
- +
@@ -216,7 +216,7 @@
- +
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') diff --git a/version.txt b/version.txt index 9d5757b..9eaf79b 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ version=0.7 -rev=9 +rev=10 -- cgit v1.2.1