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 --- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'accounts') 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') -- cgit v1.2.1