aboutsummaryrefslogtreecommitdiffstats
path: root/client/templates
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-07-21 21:47:09 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-07-21 21:47:09 +0200
commita531c5e12a65ac7c216bb3f91e510c1d31fbb06e (patch)
treec306bfc36f54815759cfe4b15b8f296865e2b70e /client/templates
parentmodify gitignore (diff)
downloadscout-subs-7aa4a6aebbb65ca67da189e8c231d5dc330d5652.tar.gz
scout-subs-7aa4a6aebbb65ca67da189e8c231d5dc330d5652.zip
static files, last improvements0.1
Diffstat (limited to '')
-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')