aboutsummaryrefslogtreecommitdiffstats
path: root/client/templates
diff options
context:
space:
mode:
Diffstat (limited to 'client/templates')
-rw-r--r--client/templates/client/approve.html2
-rw-r--r--client/templates/client/doc_create.html3
-rw-r--r--client/templates/client/doc_edit.html3
-rw-r--r--client/templates/client/index.html18
4 files changed, 22 insertions, 4 deletions
diff --git a/client/templates/client/approve.html b/client/templates/client/approve.html
index f440fbe..d24df88 100644
--- a/client/templates/client/approve.html
+++ b/client/templates/client/approve.html
@@ -24,7 +24,7 @@
<div class="col l4 offset-l4 m8 offset-m2 s12">
<div class="card">
<div class="card-content">
- <p>Per approvare l'utente inserire prima i propri dati personali cliccando il proprio nome in alto a destra.</p>
+ <p>Per approvare l'utente inserire prima i propri dati personali e medici cliccando il proprio nome in alto a destra.</p>
</div>
</div>
</div>
diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html
index 710ba29..82d23ff 100644
--- a/client/templates/client/doc_create.html
+++ b/client/templates/client/doc_create.html
@@ -117,7 +117,8 @@ $(document).ready(function(){
{% if error %}
M.toast({html: '{{ error_text}}', classes: 'orange'})
{% endif %}
- });
+});
+
function send(id) {
var form = document.getElementById('form')
var action = document.getElementById('action')
diff --git a/client/templates/client/doc_edit.html b/client/templates/client/doc_edit.html
index 0048fd5..3c97eee 100644
--- a/client/templates/client/doc_edit.html
+++ b/client/templates/client/doc_edit.html
@@ -96,7 +96,8 @@ $(document).ready(function(){
{% if error %}
M.toast({html: '{{ error_text}}', classes: 'orange'})
{% endif %}
- });
+});
+
function send(id) {
var form = document.getElementById('form')
form.submit()
diff --git a/client/templates/client/index.html b/client/templates/client/index.html
index 0eb244e..2ddbfdc 100644
--- a/client/templates/client/index.html
+++ b/client/templates/client/index.html
@@ -44,7 +44,19 @@
<br>
<br>
{% elif doc.0.status == "autosign" %}
- <a class="waves-effect waves-light btn teal" onclick="send('a{{doc.0.id}}')"><i class="material-icons left">check</i>Approva documento</a>
+ <div id="modal{{doc.0.id}}" class="modal">
+ <div class="modal-content">
+ <h4>Attenzione</h4>
+ <p>Una volta approvato il documento non potrà più essere modificato.<br>
+ Sei sicuro di volerlo approvare?
+ </p>
+ </div>
+ <div class="modal-footer">
+ <a style="color:red" href="#!" class="modal-close waves-effect waves-green btn-flat">Annulla</a>
+ <a onclick="send('a{{doc.0.id}}')" class="modal-close waves-effect waves-green btn-flat">Approva</a>
+ </div>
+ </div>
+ <a class="waves-effect waves-light btn teal modal-trigger" href="#modal{{doc.0.id}}"><i class="material-icons left">check</i>Approva documento</a>
<a class="waves-effect waves-light btn teal" onclick="send('d{{doc.0.id}}')"><i class="material-icons left">delete</i> Elimina documento</a>
<a class="waves-effect waves-light btn teal" onclick="send('e{{doc.0.id}}')"><i class="material-icons left">edit</i> Modifica documento</a>
<br>
@@ -335,15 +347,19 @@
$(document).ready(function(){
$('.collapsible').collapsible();
$('.tap-target').tapTarget();
+ $('.modal').modal();
+ $('.tooltipped').tooltip();
{% if empty %}
$('.tap-target').tapTarget('open');
{% endif %}
});
+
$('*').click(function(event) {
if (this === event.target) {
$('.tap-target').tapTarget('close');
}
});
+
function send(id) {
var form = document.getElementById('form')
var action = document.getElementById('action')