From f6f9daa8100fa59421692e2afbbc44f4d5753d66 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Fri, 21 Jan 2022 17:58:27 +0100 Subject: edit terms + change log for new version --- accounts/templates/accounts/terms.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'accounts') diff --git a/accounts/templates/accounts/terms.html b/accounts/templates/accounts/terms.html index 8b4443b..e7de26b 100644 --- a/accounts/templates/accounts/terms.html +++ b/accounts/templates/accounts/terms.html @@ -12,9 +12,11 @@
Termini e condizioni
+
Trattamento dei dati
- Creando un account accetti e comprendi i seguenti termini:
- Tutti i dati inseriti all'interno del sistema verranno condivisi con la persona a capo del gruppo di cui fai parte. + Tutti i dati inseriti verranno trattati in maniera confidenziale + e condivisi con i responsabili della sezione scout. I quali + li useranno per scopi organizzativi e non li condivideranno con terze parti.
-- cgit v1.2.1 From 901bd6cb3b14fc5aa9e2f445ad5f4a81a29b9424 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Tue, 25 Jan 2022 10:47:45 +0100 Subject: suppress deprecation warning --- accounts/views.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'accounts') diff --git a/accounts/views.py b/accounts/views.py index cd17552..cef575d 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -27,6 +27,13 @@ from pdf2image.exceptions import ( PDFSyntaxError ) +# suppress warning about dateparser deprecated dependencies +import warnings +warnings.filterwarnings( + "ignore", + message="The localize method is no longer necessary, as this time zone supports the fold attribute", +) + oauth = OAuth() hitobito = oauth.register(name="hitobito") api_url = settings.AUTHLIB_OAUTH_CLIENTS["hitobito"]["api_url"] -- cgit v1.2.1 From 89e2b918826d1cd09240a054b118dd2db5e49086 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Tue, 25 Jan 2022 10:48:53 +0100 Subject: explicit comment on non editable fields --- accounts/templates/accounts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'accounts') diff --git a/accounts/templates/accounts/index.html b/accounts/templates/accounts/index.html index 2a21cbe..670c490 100644 --- a/accounts/templates/accounts/index.html +++ b/accounts/templates/accounts/index.html @@ -54,7 +54,7 @@ - +
-- cgit v1.2.1 From 122bf81d854c380ea1f9a15d34a955722cca3e0c Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Tue, 25 Jan 2022 10:55:39 +0100 Subject: fix chrome showing white page on production --- accounts/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'accounts') diff --git a/accounts/views.py b/accounts/views.py index cef575d..dad6075 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -510,7 +510,7 @@ def personal_wrapper(request, errors): # if there wasn't any error redirect to clear POST if len(errors) == 0: - return HttpResponseRedirect("") + return HttpResponseRedirect(request.path_info) else: # no post, create empty validation -- cgit v1.2.1 From 7b3ff4bacab76138a45f018fcfee055c8fd1f186 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 31 Jan 2022 17:10:39 +0100 Subject: add go home message after saving data and other warning --- accounts/templates/accounts/index.html | 13 ++++++++++++- accounts/views.py | 12 ++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'accounts') diff --git a/accounts/templates/accounts/index.html b/accounts/templates/accounts/index.html index 670c490..563de89 100644 --- a/accounts/templates/accounts/index.html +++ b/accounts/templates/accounts/index.html @@ -17,7 +17,14 @@ {% endblock%} {% block content %} -
+
+
+
Continua l'attivazione
+

Usa questo pulsante per tornare alla home e continuare il processo d'attivazione

+
+
+ +
@@ -456,12 +463,16 @@ $(document).ready(function() { $('.datepicker').datepicker(options); $('.tabs').tabs(); $('select').formSelect(); + $('.tap-target').tapTarget(); {% for error in errors %} M.toast({html: '{{ error }}', classes: 'orange'}) {% endfor %} {% if ok_message %} M.toast({html: '{{ ok_message }}', classes: 'green'}) {% endif %} + {% if home_tooltip %} + $('.tap-target').tapTarget('open'); + {% endif %} document.getElementById("vac_certificate").onchange = function() { for (i=0; i < this.files.length; i++) { if(this.files[i].size > 1048576*10) { diff --git a/accounts/views.py b/accounts/views.py index dad6075..a2381af 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -510,7 +510,7 @@ def personal_wrapper(request, errors): # if there wasn't any error redirect to clear POST if len(errors) == 0: - return HttpResponseRedirect(request.path_info) + return HttpResponseRedirect(request.get_full_path()) else: # no post, create empty validation @@ -568,10 +568,17 @@ def personal_wrapper(request, errors): if midata_user: midata_disable = " readonly disabled" if not copy_from_midata(request, usercode): - return HttpResponseRedirect(request.path_info) + return HttpResponseRedirect(request.get_full_path()) usable_password = request.user.has_usable_password() + # check if user has saved the form + home_tooltip = False + print(errors) + if "saved" in request.GET: + # show tooltip only if user is not approved and there are no errors + home_tooltip = (not request.user.has_perm("client.approved")) and (len(errors) == 0) + # fill context context = { 'validation_dic': validation_dic, @@ -625,6 +632,7 @@ def personal_wrapper(request, errors): 'settings_active': settings_active, 'personal_active': personal_active, 'midata_enabled': MIDATA_ENABLED, + 'home_tooltip': home_tooltip, } return render(request, 'accounts/index.html', context) -- cgit v1.2.1 From 0c2337fd8677590ace47f006405917b949d1d300 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 31 Jan 2022 17:12:46 +0100 Subject: remove debug print --- accounts/views.py | 1 - 1 file changed, 1 deletion(-) (limited to 'accounts') diff --git a/accounts/views.py b/accounts/views.py index a2381af..3790436 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -574,7 +574,6 @@ def personal_wrapper(request, errors): # check if user has saved the form home_tooltip = False - print(errors) if "saved" in request.GET: # show tooltip only if user is not approved and there are no errors home_tooltip = (not request.user.has_perm("client.approved")) and (len(errors) == 0) -- cgit v1.2.1