aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--accounts/templates/accounts/index.html13
-rw-r--r--accounts/views.py12
-rw-r--r--client/templates/client/doc_create.html12
-rw-r--r--client/templates/client/doc_edit.html12
-rw-r--r--templates/registration/base_client.html9
-rw-r--r--version.txt2
6 files changed, 53 insertions, 7 deletions
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 %}
-<form action="{% url 'personal'%}" method="post" id="form1" enctype="multipart/form-data">
+<div class="tap-target {{color}}" data-target="home_btn">
+ <div class="tap-target-content">
+ <h5 style="color:white">Continua l'attivazione</h5>
+ <p style="color:white">Usa questo pulsante per tornare alla home e continuare il processo d'attivazione</p>
+ </div>
+</div>
+
+<form action="{% url 'personal'%}?saved=true" method="post" id="form1" enctype="multipart/form-data">
<div id="personal" class="row">
<div class="col l8 offset-l2 s12">
<div class="card-panel">
@@ -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)
diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html
index c1db432..71bdbbe 100644
--- a/client/templates/client/doc_create.html
+++ b/client/templates/client/doc_create.html
@@ -135,6 +135,18 @@
{% endif %}
<div class="row">
<div class="col s12">
+ <div class="card red">
+ <div class="card-content">
+ <p style="color:white"><b>
+ Attenzione: il documento non sarĂ  valido fino a quando non viene approvato. Selezionare
+ il documento dalla pagina principale per approvarlo.
+ </b></p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
<br>
<a class="btn waves-effect waves-light {{color}}" onclick="window.history.back();" >
<i class="material-icons left">navigate_before</i>Indietro
diff --git a/client/templates/client/doc_edit.html b/client/templates/client/doc_edit.html
index 3af3584..40deb26 100644
--- a/client/templates/client/doc_edit.html
+++ b/client/templates/client/doc_edit.html
@@ -98,6 +98,18 @@
{% endif %}
<div class="row">
<div class="col s12">
+ <div class="card red">
+ <div class="card-content">
+ <p style="color:white"><b>
+ Attenzione: il documento non sarĂ  valido fino a quando non viene approvato. Selezionare
+ il documento dalla pagina principale per approvarlo.
+ </b></p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
<br>
<a class="btn waves-effect waves-light {{color}}" onclick="window.history.back();" >
<i class="material-icons left">navigate_before</i>Indietro
diff --git a/templates/registration/base_client.html b/templates/registration/base_client.html
index 1827f4a..21f3dcf 100644
--- a/templates/registration/base_client.html
+++ b/templates/registration/base_client.html
@@ -87,6 +87,10 @@
border-bottom: none;
box-shadow: 0 1px 0 0 #9e9e9e;
}
+
+ .breadcrumb:last-child {
+ color: {{hexcolor}}
+ }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta charset="utf-8">
@@ -95,9 +99,8 @@
<body>
<nav class="nav-extended">
<div class="nav-wrapper {{color}}">
- <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb hide-on-small-only">Home</a>
- <ul class="left hide-on-med-and-up">
- <li><a href="{% url 'index' %}"><i class="material-icons">home</i></a></li>
+ <ul class="left">
+ <li><a id="home_btn" href="{% url 'index' %}"><i class="material-icons">home</i></a></li>
</ul>
{% block breadcrumb %}
{% endblock %}
diff --git a/version.txt b/version.txt
index 251105c..7e1c708 100644
--- a/version.txt
+++ b/version.txt
@@ -1,2 +1,2 @@
version=0.5
-rev=4
+rev=5