aboutsummaryrefslogtreecommitdiffstats
path: root/client/templates
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-08-09 18:19:11 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-08-09 18:19:11 +0200
commit50798f2814f397fbdd85b70dabca9dfb26d4cd02 (patch)
treedb0489a2a16c23f016fb89d74932fdbb6a8d9b9d /client/templates
parentremove old migrations (diff)
downloadscout-subs-50798f2814f397fbdd85b70dabca9dfb26d4cd02.tar.gz
scout-subs-50798f2814f397fbdd85b70dabca9dfb26d4cd02.zip
comment code, minor bug fixes
Diffstat (limited to 'client/templates')
-rw-r--r--client/templates/client/approve.html6
-rw-r--r--client/templates/client/index.html42
2 files changed, 30 insertions, 18 deletions
diff --git a/client/templates/client/approve.html b/client/templates/client/approve.html
index ddfc30c..3da2677 100644
--- a/client/templates/client/approve.html
+++ b/client/templates/client/approve.html
@@ -30,4 +30,10 @@
</div>
</div>
{% endif %}
+{% endblock %}
+
+{% block script %}
+$(document).ready(function(){
+ $('.tooltipped').tooltip();
+});
{% endblock %} \ No newline at end of file
diff --git a/client/templates/client/index.html b/client/templates/client/index.html
index 1915792..1a63c2e 100644
--- a/client/templates/client/index.html
+++ b/client/templates/client/index.html
@@ -373,25 +373,31 @@
{% block script %}
$(document).ready(function(){
- $('.collapsible').collapsible();
- $('.tap-target').tapTarget();
- $('.modal').modal();
$('.tooltipped').tooltip();
- {% if empty %}
- $('.tap-target').tapTarget('open');
+ {% if user.is_authenticated %}
+ {% if user.is_staff or perms.client.approved %}
+ $('.collapsible').collapsible();
+ $('.tap-target').tapTarget();
+ $('.modal').modal();
+ {% if empty %}
+ $('.tap-target').tapTarget('open');
+ {% endif %}
+ {% endif %}
{% endif %}
});
-
-$('*').click(function(event) {
- if (this === event.target) {
- $('.tap-target').tapTarget('close');
+{% if user.is_authenticated %}
+ {% if user.is_staff or perms.client.approved %}
+ $('*').click(function(event) {
+ if (this === event.target) {
+ $('.tap-target').tapTarget('close');
+ }
+ });
+ function send(id) {
+ var form = document.getElementById('form')
+ var action = document.getElementById('action')
+ action.setAttribute('value', id);
+ form.submit()
}
-});
-
-function send(id) {
- var form = document.getElementById('form')
- var action = document.getElementById('action')
- action.setAttribute('value', id);
- form.submit()
-}
-{% endblock %} \ No newline at end of file
+ {% endif %}
+{% endif %}
+{% endblock %}