diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2021-03-17 22:20:58 +0100 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2021-03-17 22:21:23 +0100 |
commit | 19d120e045991226a07bbe3929bc3ed0db818790 (patch) | |
tree | 57b2d6fb5e724b4ef1d030586676d804b273a182 /server/templates/server/index.html | |
parent | add rev to version and create document from non primary group (diff) | |
download | scout-subs-19d120e045991226a07bbe3929bc3ed0db818790.tar.gz scout-subs-19d120e045991226a07bbe3929bc3ed0db818790.zip |
users of group capi can optionally view documents
Diffstat (limited to 'server/templates/server/index.html')
-rw-r--r-- | server/templates/server/index.html | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/server/templates/server/index.html b/server/templates/server/index.html index de28169..d8a13f2 100644 --- a/server/templates/server/index.html +++ b/server/templates/server/index.html @@ -56,6 +56,23 @@ {% endif %} <div class="card large"> <div class="card-content"> + <form id="form" action="{% url 'server'%}" method="post"> + {% csrf_token %} + <div class="row"> + <div class="col s12"> + <div id="select_switch" class="switch col s12"> + Documenti visibili ad aggiunti<br class="hide-on-med-and-up"> + <label> + No + <input onclick="execute_confirm()" name="doc_view" type="checkbox" {{doc_view_check}}> + <span class="lever"></span> + Si + </label> + </div> + <a style="display: none" id="send_button" class="waves-effect waves-light btn green" onclick="form.submit()"><i class="material-icons left">check</i> Applica</a> + </div> + </div> + </form> <ul class="collection"> {% for doctype in docs %} <li class="collection-item"> @@ -97,4 +114,18 @@ </div> </div> </div> +{% endblock %} + +{% block script %} +function execute_confirm() { + var selection = document.getElementById('select_switch') + var button = document.getElementById('send_button') + selection.style.display = "none" + button.style.display = "inline-block" + {% if doc_view_check == 'checked="checked"'%} + button.innerHTML = "Applica (gli aggiunti <b>NON</b> potranno vedere i documenti)" + {% else %} + button.innerHTML = "Applica (gli aggiunti <b>POTRANNO</b> vedere i documenti)" + {% endif %} +} {% endblock %}
\ No newline at end of file |