diff options
Diffstat (limited to '')
-rw-r--r-- | client/templates/client/approve.html | 6 | ||||
-rw-r--r-- | client/templates/client/index.html | 42 |
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 %} |