diff options
Diffstat (limited to 'server/templates')
-rw-r--r-- | server/templates/server/doc_create.html | 14 | ||||
-rw-r--r-- | server/templates/server/doc_edit.html | 107 | ||||
-rw-r--r-- | server/templates/server/doc_type.html | 11 | ||||
-rw-r--r-- | server/templates/server/index.html | 12 |
4 files changed, 138 insertions, 6 deletions
diff --git a/server/templates/server/doc_create.html b/server/templates/server/doc_create.html index 9549a9d..8557f4c 100644 --- a/server/templates/server/doc_create.html +++ b/server/templates/server/doc_create.html @@ -95,6 +95,20 @@ <label for="group">Gruppo personalizzato</label> </div> </div> + <div class="row"> + <div class="input-field col l4 s12"> + <label> + <input name="staff_only" type="checkbox" class="filled-in" {{staff_only_check}}/> + <span style="color:black">Visibile solo ai capi</span> + </label> + </div> + </div> + <div class="row"> + <div class="input-field col s12"> + <textarea name="max_instances" id="max_instances" class="materialize-textarea"></textarea> + <label for="max_instances">Numero massimo di partecipanti</label> + </div> + </div> <div class="fixed-action-btn"> <a class="btn-floating btn-large {{color}}" onclick="document.getElementById('form').submit()"> <i class="large material-icons">save</i> diff --git a/server/templates/server/doc_edit.html b/server/templates/server/doc_edit.html new file mode 100644 index 0000000..fe11ab4 --- /dev/null +++ b/server/templates/server/doc_edit.html @@ -0,0 +1,107 @@ +{% extends 'registration/base_admin.html' %} + +{% block title %}Admin - Modifica Tipo{% endblock %} + +{% block breadcrumb %} + <a href="{% url 'server'%}" class="breadcrumb hide-on-med-and-down">Admin</a> + <a href="{% url 'doctype' %}" class="breadcrumb hide-on-med-and-down">Tipo Doc</a> + <a class="breadcrumb hide-on-med-and-down">Modifica Tipo</a> +{% endblock %} + +{% block content %} +<div class="row"> + <div class="col l8 offset-l2 s12"> + <div class="card-panel"> + <div class="row"> + <form id="form" action="{% url 'docedit'%}" method="post" class="col s12"> + <input type="hidden" name="doc" value="{{doc.id}}"> + {% csrf_token %} + <div class="row"> + <div class="input-field col s12"> + <input disabled name="name" value="{{doc.name}}" id="name" type="text"> + <label for="name">Nome</label> + </div> + </div> + <div class="row"> + <div class="switch col l3 s12"> + <label> + Disabilitato + <input name="enabled" type="checkbox" {{enabled_check}}> + <span class="lever"></span> + Abilitato + </label> + </div> + <div class="switch col l3 s12"> + <label> + Publico + <input name="group_private" type="checkbox" {{private_check}}> + <span class="lever"></span> + Privato + </label> + </div> + <div class="switch col l3 s12"> + <label> + Richiede firma + </label> + <label> + No + <input name="sign" type="checkbox" {{sign_check}}> + <span class="lever"></span> + Si + </label> + </div> + </div> + <div class="row"> + <div class="input-field col l4 s12"> + <label> + <input name="custom_message" type="checkbox" class="filled-in" {{custom_message_check}}/> + <span style="color:black">Messaggio personalizzato</span> + </label> + </div> + </div> + <br> + <div class="row"> + <div class="input-field col s12"> + <textarea name="custom_message_text" id="message" class="materialize-textarea">{{doc.custom_message_text}}</textarea> + <label for="message">Messaggio personalizzato</label> + </div> + </div> + <div class="row"> + <div class="input-field col s12"> + <textarea name="custom_group" id="group" class="materialize-textarea">{{group}}</textarea> + <label for="group">Gruppo personalizzato</label> + </div> + </div> + <div class="row"> + <div class="input-field col l4 s12"> + <label> + <input name="staff_only" type="checkbox" class="filled-in" {{staff_only_check}}/> + <span style="color:black">Visibile solo ai capi</span> + </label> + </div> + </div> + <div class="row"> + <div class="input-field col s12"> + <textarea name="max_instances" id="max_instances" class="materialize-textarea">{{doc.max_instances}}</textarea> + <label for="max_instances">Numero massimo di partecipanti</label> + </div> + </div> + <div class="fixed-action-btn"> + <a class="btn-floating btn-large {{color}}" onclick="document.getElementById('form').submit()"> + <i class="large material-icons">save</i> + </a> + </div> + </form> + </div> + </div> + </div> +</div> +{% endblock %} + +{% block script%} +$(document).ready(function(){ + {% if error %} + M.toast({html: '{{ error_text}}', classes: 'orange'}) + {% endif %} +}); +{% endblock %}
\ No newline at end of file diff --git a/server/templates/server/doc_type.html b/server/templates/server/doc_type.html index 8c3093d..c407239 100644 --- a/server/templates/server/doc_type.html +++ b/server/templates/server/doc_type.html @@ -137,10 +137,16 @@ {% if doctype.0.auto_sign %} <i class="material-icons">assignment_turned_in</i> {% endif %} + {% if doctype.0.staff_only %} + <i class="material-icons">lock</i> + {% endif %} {{doctype.0.name}} <span class="new badge {{color}}" data-badge-caption="">{{doctype.2}}</span> </div> <div class="collapsible-body"><span> + <a class="waves-effect waves-light btn {{color}}" onclick="send('e{{doctype.0.id}}')"><i class="material-icons left">edit</i> Modifica tipo</a> + <br> + <br> <ul class="collection"> {% if not doctype.0.group_private %} <li class="collection-item"> @@ -157,6 +163,11 @@ <i class="material-icons left">healing</i>Dati medici </li> {% endif %} + {% if doctype.0.max_instances != 0 %} + <li class="collection-item"> + <i class="material-icons left">control_point_duplicate</i>Numero massimo di partecipanti: {{doctype.0.max_instances}} + </li> + {% endif %} </ul> {% if doctype.0.custom_data or doctype.0.custom_message %} <ul class="collapsible"> diff --git a/server/templates/server/index.html b/server/templates/server/index.html index aa4681e..de28169 100644 --- a/server/templates/server/index.html +++ b/server/templates/server/index.html @@ -31,13 +31,13 @@ </div> <div class="card-action"> <div class="hide-on-med-and-down"> - <a class="waves-effect waves-light btn {{color}}" href="{% url 'ulist' %}">Lista utenti</a> + <a class="waves-effect waves-light btn {{color}}" href="{% url 'ulist' %}">Utenti</a> <a class="waves-effect waves-light btn {{color}}" href="{% url 'uapprove' %}">Approva utente</a> <a class="waves-effect waves-light btn {{color}}" href="{% url 'request' %}">Richiedi dati</a> </div> <div class="hide-on-large-only"> - <a class="col s12 waves-effect waves-light btn {{color}}" href="{% url 'ulist' %}">Lista utenti</a> + <a class="col s12 waves-effect waves-light btn {{color}}" href="{% url 'ulist' %}">Utenti</a> <br> <br> <a class="col s12 waves-effect waves-light btn {{color}}" href="{% url 'uapprove' %}">Approva utente</a> @@ -75,17 +75,17 @@ </div> <div class="card-action"> <div class="hide-on-med-and-down"> - <a class="waves-effect waves-light btn {{color}}" href="{% url 'doctype' %}">Lista tipo doc</a> - <a class="waves-effect waves-light btn {{color}}" href="{% url 'doclist' %}">Lista documenti</a> + <a class="waves-effect waves-light btn {{color}}" href="{% url 'doctype' %}">Tipi</a> + <a class="waves-effect waves-light btn {{color}}" href="{% url 'doclist' %}">Documenti</a> <a class="waves-effect waves-light btn {{color}}" href="{% url 'docapprove' %}">Approva documento</a> <a class="waves-effect waves-light btn {{color}}" href="{% url 'docupload' %}">Carica firma</a> </div> <div class="hide-on-large-only"> - <a class="col s12 waves-effect waves-light btn {{color}}" href="{% url 'doctype' %}">Lista tipo doc</a> + <a class="col s12 waves-effect waves-light btn {{color}}" href="{% url 'doctype' %}">Tipi</a> <br> <br> - <a class="col s12 waves-effect waves-light btn {{color}}" href="{% url 'doclist' %}">Lista documenti</a> + <a class="col s12 waves-effect waves-light btn {{color}}" href="{% url 'doclist' %}">Documenti</a> <br> <br> <a class="col s12 waves-effect waves-light btn {{color}}" href="{% url 'docapprove' %}">Approva documento</a> |