aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2022-01-02 21:00:12 +0100
committerAndrea Lepori <alepori@student.ethz.ch>2022-01-02 21:00:34 +0100
commit8c4cdc81f993bcf4d088d2356a45da8d883bdf01 (patch)
tree6f422b46f41eb55c04c856ed64129339d372fc4a
parentMerge branch 'master' into dev (diff)
downloadscout-subs-8c4cdc81f993bcf4d088d2356a45da8d883bdf01.tar.gz
scout-subs-8c4cdc81f993bcf4d088d2356a45da8d883bdf01.zip
login/register with midata
-rw-r--r--accounts/templates/accounts/index.html33
-rw-r--r--accounts/urls.py2
-rw-r--r--accounts/views.py82
-rw-r--r--client/migrations/0010_auto_20220102_1933.py23
-rw-r--r--client/models.py2
-rw-r--r--client/templates/client/index.html730
-rw-r--r--client/views.py196
-rw-r--r--manager/settings.py1
-rw-r--r--static/pbs_logo.svg1
-rw-r--r--templates/registration/base_client.html36
-rw-r--r--templates/registration/login.html24
-rw-r--r--version.txt2
12 files changed, 631 insertions, 501 deletions
diff --git a/accounts/templates/accounts/index.html b/accounts/templates/accounts/index.html
index 0af8ce1..874231b 100644
--- a/accounts/templates/accounts/index.html
+++ b/accounts/templates/accounts/index.html
@@ -1,4 +1,5 @@
{% extends 'registration/base_client.html' %}
+{% load static %}
{% block title %}Profilo{% endblock %}
@@ -10,6 +11,7 @@
<ul class="tabs tabs-transparent">
<li class="tab"><a class="active" href="#personal">Info Personali</a></li>
<li class="tab"><a href="#medic">Info Mediche</a></li>
+ <li class="tab"><a href="#misc">Impostazioni</a></li>
</ul>
</div>
{% endblock%}
@@ -312,6 +314,37 @@
</div>
</div>
</div>
+<div id="misc" class="row">
+ <div class="col l8 offset-l2 s12">
+ <div class="card-panel">
+ <div class="row">
+ <div class="col s12">
+ <h6>Collegamento con MiData</h6>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ Collega il tuo account con MiData per avere un login unico. Attenzione una volta collegato il
+ tuo account i dati presenti su MiData dovranno essere modificati sulla piattaforma stessa.
+ </div>
+ </div>
+ <div class="row">
+ <div class="col m6 s12">
+ <a href={% url 'oauth_login' %} style="width: 100%; background-color: #99BF62" class="btn waves-effect waves-light">
+ <div class="row">
+ <div class="col s2">
+ <img style="height: 30px; padding-top: 3px" src="{% static 'pbs_logo.svg' %}" alt="PBS Logo">
+ </div>
+ <div class="col s10">
+ Collega a MiData
+ </div>
+ </div>
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
{% endblock %}
{% block script %}
diff --git a/accounts/urls.py b/accounts/urls.py
index 15d8124..5f04051 100644
--- a/accounts/urls.py
+++ b/accounts/urls.py
@@ -8,4 +8,6 @@ urlpatterns = [
path('terms/', views.terms, name='terms'),
path('oauth_login/', views.oauth_login, name='oauth_login'),
path('auth/', views.auth, name='auth'),
+ path('oauth_connect/', views.oauth_connect, name='oauth_connect'),
+ path('auth_connect/', views.auth_connect, name='auth_connect'),
]
diff --git a/accounts/views.py b/accounts/views.py
index ef2d6c1..06459d7 100644
--- a/accounts/views.py
+++ b/accounts/views.py
@@ -1,21 +1,23 @@
from django.shortcuts import render
from django.urls import reverse
+from django.shortcuts import redirect
from django.conf import settings
-from django.contrib.auth.views import LoginView
from django.contrib.auth.forms import UserCreationForm
+from django.contrib.auth.models import User
from django.contrib.auth import login, authenticate
from django.http import FileResponse
from django.contrib.auth.decorators import login_required
from django.views.decorators.debug import sensitive_variables
from django.http import HttpResponseRedirect
-from client.models import UserCode
+from client.models import UserCode, MedicalData
from authlib.integrations.django_client import OAuth
import dateparser
import os
import requests
+from random import randint
from io import BytesIO
from PIL import Image, UnidentifiedImageError
from pdf2image import convert_from_bytes
@@ -24,8 +26,23 @@ from pdf2image.exceptions import (
PDFSyntaxError
)
-oauth = OAuth()
+def update_token(name, token, refresh_token=None, access_token=None):
+ if refresh_token:
+ item = OAuth2Token.find(name=name, refresh_token=refresh_token)
+ elif access_token:
+ item = OAuth2Token.find(name=name, access_token=access_token)
+ else:
+ return
+
+ # update old token
+ item.access_token = token['access_token']
+ item.refresh_token = token.get('refresh_token')
+ item.expires_at = token['expires_at']
+ item.save()
+
+oauth = OAuth(update_token=update_token)
hitobito = oauth.register(name="hitobito")
+api_url = settings.AUTHLIB_OAUTH_CLIENTS["hitobito"]["api_url"]
# override to remove help text
class RegisterForm(UserCreationForm):
@@ -35,20 +52,71 @@ class RegisterForm(UserCreationForm):
for fieldname in ['username', 'password1', 'password2']:
self.fields[fieldname].help_text = None
+# send to hitobito request to get token
def oauth_login(request):
redirect_uri = request.build_absolute_uri(reverse('auth'))
return hitobito.authorize_redirect(request, redirect_uri)
+# callback after acquiring token
def auth(request):
token = hitobito.authorize_access_token(request)
- print(token)
+
+ # request data from user account
+ headers = {
+ "Authorization" : "Bearer " + token["access_token"],
+ "X-Scope": "with_roles",
+ }
+ resp = requests.get(api_url, headers=headers)
+ resp_data = resp.json()
+
+ # find user with that id
+ usercode = UserCode.objects.filter(midata_id=resp_data["id"])
+
+ if len(usercode) > 0:
+ # user exist
+ login(request, usercode[0].user)
+ return HttpResponseRedirect('/')
+
+ user = User.objects.create_user(resp_data["email"], resp_data["email"])
+
+ # create new usercode
+ while (True):
+ code = randint(100000, 999999)
+ if len(UserCode.objects.filter(code=code)) == 0:
+ break
+
+ medic = MedicalData()
+ medic.save()
+ userCode = UserCode(user=user, code=code, medic=medic, midata_id=resp_data["id"], midata_token=token["access_token"])
+ userCode.save()
+
+ login(request, user)
+
+ return HttpResponseRedirect('/')
+
+# send to hitobito request to get token
+def oauth_connect(request):
+ redirect_uri = request.build_absolute_uri(reverse('auth_connect'))
+ return hitobito.authorize_redirect(request, redirect_uri)
+
+# callback after acquiring token
+def auth_connect(request):
+ token = hitobito.authorize_access_token(request)
+
+ # request data from user account
headers = {
"Authorization" : "Bearer " + token["access_token"],
"X-Scope": "with_roles",
}
- resp = requests.get("https://demo.hitobito.com/oauth/profile", headers=headers)
- print(resp)
- print(resp.text)
+ resp = requests.get(api_url, headers=headers)
+ resp_data = resp.json()
+
+ # find user with that id
+ usercode = UserCode.objects.filter(user=user)[0]
+ usercode.midata_id = resp_data["id"]
+ usercode.midata_token = token["access_token"]
+ usercode.save()
+
return HttpResponseRedirect('/')
@sensitive_variables("raw_passsword")
diff --git a/client/migrations/0010_auto_20220102_1933.py b/client/migrations/0010_auto_20220102_1933.py
new file mode 100644
index 0000000..45d6f08
--- /dev/null
+++ b/client/migrations/0010_auto_20220102_1933.py
@@ -0,0 +1,23 @@
+# Generated by Django 3.1.4 on 2022-01-02 18:33
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('client', '0009_merge_20210723_1805'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='usercode',
+ name='midata_id',
+ field=models.IntegerField(default=0),
+ ),
+ migrations.AddField(
+ model_name='usercode',
+ name='midata_token',
+ field=models.CharField(default='', max_length=1024),
+ ),
+ ]
diff --git a/client/models.py b/client/models.py
index db31194..b94806b 100644
--- a/client/models.py
+++ b/client/models.py
@@ -113,6 +113,8 @@ class UserCode(models.Model):
school = models.CharField(default="", max_length=250)
year = models.IntegerField(default=0)
avs_number = models.CharField(default="", max_length=250)
+ midata_id = models.IntegerField(default=0)
+ midata_token = models.CharField(default="", max_length=1024)
class GroupSettings(models.Model):
group = models.ForeignKey(Group, default=None, on_delete=models.CASCADE)
diff --git a/client/templates/client/index.html b/client/templates/client/index.html
index ae3392f..e31ce34 100644
--- a/client/templates/client/index.html
+++ b/client/templates/client/index.html
@@ -16,400 +16,388 @@
<input type="hidden" name="action" id="action">
</form>
-{% if user.is_authenticated %}
- {% if user.is_staff or perms.client.approved %}
- <div id="modal_capi" class="modal">
- <div class="modal-content">
- <h4>Attenzione</h4>
- <p>I capi gruppo interessati verranno notificati dell'accesso alla pagina dei documenti.<br>
- Sei sicuro di voler continuare?
- </p>
- </div>
- <div class="modal-footer">
- <a style="color:red" href="#!" class="modal-close waves-effect waves-green btn-flat">Annulla</a>
- <a href="{% url 'doclistro' %}" class="modal-close waves-effect waves-green btn-flat">Continua</a>
- </div>
+{% if user.is_staff or perms.client.approved %}
+ <div id="modal_capi" class="modal">
+ <div class="modal-content">
+ <h4>Attenzione</h4>
+ <p>I capi gruppo interessati verranno notificati dell'accesso alla pagina dei documenti.<br>
+ Sei sicuro di voler continuare?
+ </p>
</div>
- {% if not empty %}
- <ul class="collapsible">
- {% for doc in docs %}
- <li>
- <div class="collapsible-header">
- {% if doc.status == "wait" %}
- <i class="material-icons">timelapse</i>
- {% elif doc.status == "ok" %}
- <i class="material-icons">check</i>
- {% elif doc.status == "autosign" %}
- <i class="material-icons">assignment_turned_in</i>
- {% endif %}
- {{doc.document_type.name}}
- <span class="badge" data-badge-caption="">{{doc.compilation_date}}</span>
- </div>
- <div class="collapsible-body"><span>
+ <div class="modal-footer">
+ <a style="color:red" href="#!" class="modal-close waves-effect waves-green btn-flat">Annulla</a>
+ <a href="{% url 'doclistro' %}" class="modal-close waves-effect waves-green btn-flat">Continua</a>
+ </div>
+ </div>
+ {% if not empty %}
+ <ul class="collapsible">
+ {% for doc in docs %}
+ <li>
+ <div class="collapsible-header">
{% if doc.status == "wait" %}
- <div class="hide-on-med-and-down">
- <a class="waves-effect waves-light btn {{color}}" onclick="send('f{{doc.id}}')"><i class="material-icons left">file_download</i> Scarica documento per approvazione</a>
- <a class="waves-effect waves-light btn {{color}}" onclick="send('d{{doc.id}}')"><i class="material-icons left">delete</i> Elimina iscrizione</a>
- <a class="waves-effect waves-light btn {{color}}" onclick="send('e{{doc.id}}')"><i class="material-icons left">edit</i> Modifica iscrizione</a>
- </div>
- <div style="margin-bottom: 0px;" class="hide-on-large-only row">
- <a class="col s12 waves-effect waves-light btn {{color}}" onclick="send('f{{doc.id}}')"><i class="material-icons left">file_download</i> Scarica documento per approvazione</a>
- <br>
- <br>
- <a class="col s12 waves-effect waves-light btn {{color}}" onclick="send('d{{doc.id}}')"><i class="material-icons left">delete</i> Elimina iscrizione</a>
- <br>
- <br>
- <a class="col s12 waves-effect waves-light btn {{color}}" onclick="send('e{{doc.id}}')"><i class="material-icons left">edit</i> Modifica iscrizione</a>
- </div>
+ <i class="material-icons">timelapse</i>
+ {% elif doc.status == "ok" %}
+ <i class="material-icons">check</i>
+ {% elif doc.status == "autosign" %}
+ <i class="material-icons">assignment_turned_in</i>
+ {% endif %}
+ {{doc.document_type.name}}
+ <span class="badge" data-badge-caption="">{{doc.compilation_date}}</span>
+ </div>
+ <div class="collapsible-body"><span>
+ {% if doc.status == "wait" %}
+ <div class="hide-on-med-and-down">
+ <a class="waves-effect waves-light btn {{color}}" onclick="send('f{{doc.id}}')"><i class="material-icons left">file_download</i> Scarica documento per approvazione</a>
+ <a class="waves-effect waves-light btn {{color}}" onclick="send('d{{doc.id}}')"><i class="material-icons left">delete</i> Elimina iscrizione</a>
+ <a class="waves-effect waves-light btn {{color}}" onclick="send('e{{doc.id}}')"><i class="material-icons left">edit</i> Modifica iscrizione</a>
+ </div>
+ <div style="margin-bottom: 0px;" class="hide-on-large-only row">
+ <a class="col s12 waves-effect waves-light btn {{color}}" onclick="send('f{{doc.id}}')"><i class="material-icons left">file_download</i> Scarica documento per approvazione</a>
<br>
<br>
- {% elif doc.status == "autosign" %}
- <div id="modal{{doc.id}}" class="modal">
- <div class="modal-content">
- <h4>Attenzione</h4>
- <p>Approvo il documento accettando tutte le clausole apposte su di esso. <br>
- Comprovo come veritieri e completi tutti i dati apposti sul documento.
- {% if doc.document_type.medical_data %}
- <br>
- Autorizzo i capi ad usare i dati medici, in caso d'emergenza, ed intraprendere i passi necessari per dare avvio a cure mediche d’urgenza anche senza essere ulteriormente consultato/a.
- {% endif %}
- {% if doc.document_type.custom_message %}
- <br>
- <br>
- Inoltre accetto e prendo nota della seguente clausula aggiuntiva: <br>
- {{doc.document_type.custom_message_text}}
- {% endif %}
+ <a class="col s12 waves-effect waves-light btn {{color}}" onclick="send('d{{doc.id}}')"><i class="material-icons left">delete</i> Elimina iscrizione</a>
+ <br>
+ <br>
+ <a class="col s12 waves-effect waves-light btn {{color}}" onclick="send('e{{doc.id}}')"><i class="material-icons left">edit</i> Modifica iscrizione</a>
+ </div>
+ <br>
+ <br>
+ {% elif doc.status == "autosign" %}
+ <div id="modal{{doc.id}}" class="modal">
+ <div class="modal-content">
+ <h4>Attenzione</h4>
+ <p>Approvo il documento accettando tutte le clausole apposte su di esso. <br>
+ Comprovo come veritieri e completi tutti i dati apposti sul documento.
+ {% if doc.document_type.medical_data %}
<br>
+ Autorizzo i capi ad usare i dati medici, in caso d'emergenza, ed intraprendere i passi necessari per dare avvio a cure mediche d’urgenza anche senza essere ulteriormente consultato/a.
+ {% endif %}
+ {% if doc.document_type.custom_message %}
<br>
- <b>Una volta approvata l'iscrizione non potrà più essere modificata o annullata.<br>
- Sei sicuro di volerla approvare?</b>
- </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.id}}')" class="modal-close waves-effect waves-green btn-flat">Approva</a>
- </div>
- </div>
- <div class="hide-on-med-and-down">
- <a class="waves-effect waves-light btn {{color}} modal-trigger" href="#modal{{doc.id}}"><i class="material-icons left">check</i>Approva iscrizione</a>
- <a class="waves-effect waves-light btn {{color}}" onclick="send('d{{doc.id}}')"><i class="material-icons left">delete</i>Elimina iscrizione</a>
- <a class="waves-effect waves-light btn {{color}}" onclick="send('e{{doc.id}}')"><i class="material-icons left">edit</i>Modifica iscrizione</a>
- </div>
- <div style="margin-bottom: 0px;" class="hide-on-large-only row">
- <a class="col s12 waves-effect waves-light btn {{color}} modal-trigger" href="#modal{{doc.id}}"><i class="material-icons left">check</i>Approva iscrizione</a>
- <br>
- <br>
- <a class="col s12 waves-effect waves-light btn {{color}}" onclick="send('d{{doc.id}}')"><i class="material-icons left">delete</i>Elimina iscrizione</a>
+ <br>
+ Inoltre accetto e prendo nota della seguente clausula aggiuntiva: <br>
+ {{doc.document_type.custom_message_text}}
+ {% endif %}
<br>
<br>
- <a class="col s12 waves-effect waves-light btn {{color}}" onclick="send('e{{doc.id}}')"><i class="material-icons left">edit</i>Modifica iscrizione</a>
+ <b>Una volta approvata l'iscrizione non potrà più essere modificata o annullata.<br>
+ Sei sicuro di volerla approvare?</b>
+ </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.id}}')" class="modal-close waves-effect waves-green btn-flat">Approva</a>
+ </div>
+ </div>
+ <div class="hide-on-med-and-down">
+ <a class="waves-effect waves-light btn {{color}} modal-trigger" href="#modal{{doc.id}}"><i class="material-icons left">check</i>Approva iscrizione</a>
+ <a class="waves-effect waves-light btn {{color}}" onclick="send('d{{doc.id}}')"><i class="material-icons left">delete</i>Elimina iscrizione</a>
+ <a class="waves-effect waves-light btn {{color}}" onclick="send('e{{doc.id}}')"><i class="material-icons left">edit</i>Modifica iscrizione</a>
+ </div>
+ <div style="margin-bottom: 0px;" class="hide-on-large-only row">
+ <a class="col s12 waves-effect waves-light btn {{color}} modal-trigger" href="#modal{{doc.id}}"><i class="material-icons left">check</i>Approva iscrizione</a>
<br>
<br>
- {% endif %}
- <ul class="collection">
- <li class="collection-item">
- <i class="material-icons left">confirmation_number</i>{{doc.code}}
- </li>
- </ul>
- <ul class="collapsible">
- {% if doc.document_type.personal_data %}
- <li>
- <div class="collapsible-header">
- <i class="material-icons">person</i>Dati personali
- </div>
- <div class="collapsible-body"><span>
- <div class="row">
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.user.first_name}}" id="first_name" type="text" >
- <label for="first_name">Nome</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.user.last_name}}" id="last_name" type="text" >
- <label for="last_name">Cognome</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.personal_data.born_date}}" id="birth_date" type="text">
- <label for="birth_date">Data di nascita</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{base_group}}" id="branca" type="text">
- <label for="branca">Branca</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.personal_data.parent_name}}" id="parent_name" type="text" >
- <label for="parent_name">Nome dei genitori</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.personal_data.avs_number}}" id="avs_number" type="text">
- <label for="avs_number">Numero AVS</label>
- </div>
- <div class="input-field col l12 s12">
- <input value="{{doc.personal_data.via}}" disabled id="via" type="text" >
- <label for="via">Via e numero</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.personal_data.cap}}" name="cap" id="cap" type="text" >
- <label for="cap">CAP</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.personal_data.country}}" name="country" id="country" type="text" >
- <label for="country">Comune</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.personal_data.nationality}}" name="nationality" id="nationality" type="text" >
- <label for="nationality">Nazionalit&agrave;</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.personal_data.phone}}" name="phone" id="phone" type="text" >
- <label for="phone">Cellulare</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.personal_data.home_phone}}" name="home_phone" id="home_phone" type="text" >
- <label for="home_phone">Telefono di casa</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.personal_data.email}}" name="email" id="email" type="text" >
- <label for="email">Email</label>
- </div>
- <div class="input-field col l8 s12">
- <input disabled value="{{doc.personal_data.school}}" name="school" id="school" type="text" >
- <label for="school">Scuola frequentata</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.personal_data.year}}" name="year" id="year" type="text" >
- <label for="year">Classe</label>
- </div>
+ <a class="col s12 waves-effect waves-light btn {{color}}" onclick="send('d{{doc.id}}')"><i class="material-icons left">delete</i>Elimina iscrizione</a>
+ <br>
+ <br>
+ <a class="col s12 waves-effect waves-light btn {{color}}" onclick="send('e{{doc.id}}')"><i class="material-icons left">edit</i>Modifica iscrizione</a>
+ </div>
+ <br>
+ <br>
+ {% endif %}
+ <ul class="collection">
+ <li class="collection-item">
+ <i class="material-icons left">confirmation_number</i>{{doc.code}}
+ </li>
+ </ul>
+ <ul class="collapsible">
+ {% if doc.document_type.personal_data %}
+ <li>
+ <div class="collapsible-header">
+ <i class="material-icons">person</i>Dati personali
+ </div>
+ <div class="collapsible-body"><span>
+ <div class="row">
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.user.first_name}}" id="first_name" type="text" >
+ <label for="first_name">Nome</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.user.last_name}}" id="last_name" type="text" >
+ <label for="last_name">Cognome</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.personal_data.born_date}}" id="birth_date" type="text">
+ <label for="birth_date">Data di nascita</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{base_group}}" id="branca" type="text">
+ <label for="branca">Branca</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.personal_data.parent_name}}" id="parent_name" type="text" >
+ <label for="parent_name">Nome dei genitori</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.personal_data.avs_number}}" id="avs_number" type="text">
+ <label for="avs_number">Numero AVS</label>
+ </div>
+ <div class="input-field col l12 s12">
+ <input value="{{doc.personal_data.via}}" disabled id="via" type="text" >
+ <label for="via">Via e numero</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.personal_data.cap}}" name="cap" id="cap" type="text" >
+ <label for="cap">CAP</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.personal_data.country}}" name="country" id="country" type="text" >
+ <label for="country">Comune</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.personal_data.nationality}}" name="nationality" id="nationality" type="text" >
+ <label for="nationality">Nazionalit&agrave;</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.personal_data.phone}}" name="phone" id="phone" type="text" >
+ <label for="phone">Cellulare</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.personal_data.home_phone}}" name="home_phone" id="home_phone" type="text" >
+ <label for="home_phone">Telefono di casa</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.personal_data.email}}" name="email" id="email" type="text" >
+ <label for="email">Email</label>
+ </div>
+ <div class="input-field col l8 s12">
+ <input disabled value="{{doc.personal_data.school}}" name="school" id="school" type="text" >
+ <label for="school">Scuola frequentata</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.personal_data.year}}" name="year" id="year" type="text" >
+ <label for="year">Classe</label>
</div>
- </span></div>
- </li>
- {% endif %}
- {% if doc.document_type.medical_data %}
- <li>
- <div class="collapsible-header">
- {% if doc.medical_data %}
- <i class="material-icons">healing</i>Dati medici
- {% else %}
- <i class="material-icons">healing</i><del>Dati medici</del>
- {% endif %}
</div>
+ </span></div>
+ </li>
+ {% endif %}
+ {% if doc.document_type.medical_data %}
+ <li>
+ <div class="collapsible-header">
{% if doc.medical_data %}
- <div class="collapsible-body"><span>
- <div class="row">
- <div class="col s12">
- <h6>Persona di contatto in caso di necessit&agrave;</h6>
- </div>
+ <i class="material-icons">healing</i>Dati medici
+ {% else %}
+ <i class="material-icons">healing</i><del>Dati medici</del>
+ {% endif %}
+ </div>
+ {% if doc.medical_data %}
+ <div class="collapsible-body"><span>
+ <div class="row">
+ <div class="col s12">
+ <h6>Persona di contatto in caso di necessit&agrave;</h6>
</div>
- <div class="row">
- <div class="input-field col l6 s12">
- <input disabled name="emer_name" value="{{doc.medical_data.emer_name}}" id="emer_name" type="text" >
- <label for="emer_name">Nome e cognome</label>
- </div>
- <div class="input-field col l3 s12">
- <input disabled name="emer_relative" value="{{doc.medical_data.emer_relative}}" id="emer_relative" type="text" >
- <label for="emer_releative">Parentela</label>
- </div>
- <div class="input-field col l3 s12">
- <input disabled name="cell_phone" value="{{doc.medical_data.cell_phone}}" id="cellphone" type="text" >
- <label for="cell_phone">Cellulare</label>
- </div>
- <div class="input-field col l9 s12">
- <input disabled value="{{doc.medical_data.address}}" name="address" id="address" type="text" >
- <label for="address">Indirizzo completo</label>
- </div>
- <div class="input-field col l3 s12">
- <input disabled value="{{doc.medical_data.emer_phone}}" name="emer_phone" id="emer_phone" type="text" >
- <label for="emer_phone">Telefono di casa</label>
- </div>
+ </div>
+ <div class="row">
+ <div class="input-field col l6 s12">
+ <input disabled name="emer_name" value="{{doc.medical_data.emer_name}}" id="emer_name" type="text" >
+ <label for="emer_name">Nome e cognome</label>
</div>
- <div class="row">
- <div class="col s12">
- <h6>Assicurazione</h6>
- </div>
+ <div class="input-field col l3 s12">
+ <input disabled name="emer_relative" value="{{doc.medical_data.emer_relative}}" id="emer_relative" type="text" >
+ <label for="emer_releative">Parentela</label>
</div>
- <div class="row">
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.medical_data.health_care}}" name="health_care" id="health_care" type="text" >
- <label for="health_care">Cassa Malati</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.medical_data.injuries}}" name="injuries" id="injuries" type="text" >
- <label for="injuries">Infortuni</label>
- </div>
- <div class="input-field col l4 s12">
- <input disabled value="{{doc.medical_data.rc}}" name="rc" id="rc" type="text" >
- <label for="rc">Responsabilit&agrave; civile</label>
- </div>
+ <div class="input-field col l3 s12">
+ <input disabled name="cell_phone" value="{{doc.medical_data.cell_phone}}" id="cellphone" type="text" >
+ <label for="cell_phone">Cellulare</label>
</div>
- <div class="row">
- <div class="switch col s12">
- &Egrave; sostenitore REGA&nbsp;&nbsp;
- <label>
- No
- <input disabled name="rega" type="checkbox" {% if doc.medical_data.rega %}checked="checked"{%endif%}>
- <span class="lever"></span>
- Si
- </label>
- </div>
+ <div class="input-field col l9 s12">
+ <input disabled value="{{doc.medical_data.address}}" name="address" id="address" type="text" >
+ <label for="address">Indirizzo completo</label>
</div>
- <div class="row">
- <div class="col s12">
- <h6>Medico di famiglia</h6>
- </div>
- <div class="input-field col l6 s12">
- <input disabled value="{{doc.medical_data.medic_name}}" name="medic_name" id="medic_name" type="text" >
- <label for="medic_name">Nome e cognome</label>
- </div>
- <div class="input-field col l6 s12">
- <input disabled value="{{doc.medical_data.medic_phone}}" name="medic_phone" id="medic_phone" type="text" >
- <label for="medic_phone">Telefono studio</label>
- </div>
- <div class="input-field col l12 s12">
- <input disabled value="{{doc.medical_data.medic_address}}" name="medic_address" id="medic_address" type="text" >
- <label for="medic_address">Indirizzo completo</label>
- </div>
+ <div class="input-field col l3 s12">
+ <input disabled value="{{doc.medical_data.emer_phone}}" name="emer_phone" id="emer_phone" type="text" >
+ <label for="emer_phone">Telefono di casa</label>
</div>
- <div class="row">
- <div class="col s12">
- <h6>Scheda medica personale</h6>
- </div>
- <div class="input-field col s12">
- <input disabled value="{{doc.medical_data.sickness}}" name="sickness" id="sickness" type="text">
- <label for="sickness">Principali malattie avute</label>
- </div>
- <div class="input-field col l8 s12">
- <input disabled value="{{doc.medical_data.vaccine}}" name="vaccine" id="vaccine" type="text">
- <label for="vaccine">Vacinazioni fatte</label>
- </div>
- <div class="input-field col l4 s12">
- <label for="tetanus_date">Ultima vacinazione contro il tetano</label>
- <input disabled value="{{doc.medical_data.tetanus_date}}" name="tetanus_date" id="tetanus_date" type="text">
- </div>
- <div class="input-field col s12">
- <input disabled value="{{doc.medical_data.allergy}}" name="allergy" id="allergy" type="text">
- <label for="allergy">Allergie particolari/Intolleraze alimentari</label>
- </div>
- <div class="switch col s12">
- Deve assumere regolarmente medicamenti&nbsp;&nbsp;
- <label>
- No
- <input disabled name="drugs_bool" type="checkbox" {% if doc.medical_data.drugs_bool %}checked="checked"{%endif%}>
- <span class="lever"></span>
- Si
- </label>
- </div>
- <div class="input-field col s12">
- <input disabled value="{{doc.medical_data.drugs}}" name="drugs" id="drugs" type="text">
- <label for="drugs">Se s&igrave; quali, in che dosi e prescrizioni</label>
- </div>
- <div class="switch col s12">
- Informazioni particolari sullo stato di salute: (postumi di operazioni, incidenti, malattie, disturbi fisici)&nbsp;&nbsp;
- <label>
- No
- <input disabled name="misc_bool" type="checkbox" {% if doc.medical_data.misc_bool %}checked="checked"{%endif%}>
- <span class="lever"></span>
- Si
- </label>
- </div>
- <div class="input-field col s12">
- <input disabled value="{{doc.medical_data.misc}}" name="misc" id="misc" type="text">
- <label for="misc">Se s&igrave; quali</label>
- </div>
- </span></div>
- {% endif %}
- </li>
- {% endif %}
- {% if doc.document_type.custom_data %}
- <li>
- <div class="collapsible-header">
- <i class="material-icons">add_circle_outline</i>Dati aggiuntivi
</div>
- <div class="collapsible-body"><span>
- <table class="striped">
- <tbody>
- {% for key in doc|doc_key %}
- <tr>
- <td>{{key.key}}</td>
- <td>{{key.value}}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </span></div>
- </li>
- {% endif %}
- <li>
- <div class="collapsible-header">
- <i class="material-icons">attach_file</i>Allegati
+ <div class="row">
+ <div class="col s12">
+ <h6>Assicurazione</h6>
+ </div>
+ </div>
+ <div class="row">
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.medical_data.health_care}}" name="health_care" id="health_care" type="text" >
+ <label for="health_care">Cassa Malati</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.medical_data.injuries}}" name="injuries" id="injuries" type="text" >
+ <label for="injuries">Infortuni</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <input disabled value="{{doc.medical_data.rc}}" name="rc" id="rc" type="text" >
+ <label for="rc">Responsabilit&agrave; civile</label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="switch col s12">
+ &Egrave; sostenitore REGA&nbsp;&nbsp;
+ <label>
+ No
+ <input disabled name="rega" type="checkbox" {% if doc.medical_data.rega %}checked="checked"{%endif%}>
+ <span class="lever"></span>
+ Si
+ </label>
+ </div>
</div>
- <div class="collapsible-body"><span>
- <div class="row">
- <div class="col s12">
- <div class="card">
- <div class="card-image">
- {% if doc.signed_doc %} <img class="lazyload" data-src="{{ sign_doc_file.0 }}{{ doc.id }}{{ sign_doc_file.1 }}"> {% endif %}
- </div>
+ <div class="row">
+ <div class="col s12">
+ <h6>Medico di famiglia</h6>
+ </div>
+ <div class="input-field col l6 s12">
+ <input disabled value="{{doc.medical_data.medic_name}}" name="medic_name" id="medic_name" type="text" >
+ <label for="medic_name">Nome e cognome</label>
+ </div>
+ <div class="input-field col l6 s12">
+ <input disabled value="{{doc.medical_data.medic_phone}}" name="medic_phone" id="medic_phone" type="text" >
+ <label for="medic_phone">Telefono studio</label>
+ </div>
+ <div class="input-field col l12 s12">
+ <input disabled value="{{doc.medical_data.medic_address}}" name="medic_address" id="medic_address" type="text" >
+ <label for="medic_address">Indirizzo completo</label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <h6>Scheda medica personale</h6>
+ </div>
+ <div class="input-field col s12">
+ <input disabled value="{{doc.medical_data.sickness}}" name="sickness" id="sickness" type="text">
+ <label for="sickness">Principali malattie avute</label>
+ </div>
+ <div class="input-field col l8 s12">
+ <input disabled value="{{doc.medical_data.vaccine}}" name="vaccine" id="vaccine" type="text">
+ <label for="vaccine">Vacinazioni fatte</label>
+ </div>
+ <div class="input-field col l4 s12">
+ <label for="tetanus_date">Ultima vacinazione contro il tetano</label>
+ <input disabled value="{{doc.medical_data.tetanus_date}}" name="tetanus_date" id="tetanus_date" type="text">
+ </div>
+ <div class="input-field col s12">
+ <input disabled value="{{doc.medical_data.allergy}}" name="allergy" id="allergy" type="text">
+ <label for="allergy">Allergie particolari/Intolleraze alimentari</label>
+ </div>
+ <div class="switch col s12">
+ Deve assumere regolarmente medicamenti&nbsp;&nbsp;
+ <label>
+ No
+ <input disabled name="drugs_bool" type="checkbox" {% if doc.medical_data.drugs_bool %}checked="checked"{%endif%}>
+ <span class="lever"></span>
+ Si
+ </label>
+ </div>
+ <div class="input-field col s12">
+ <input disabled value="{{doc.medical_data.drugs}}" name="drugs" id="drugs" type="text">
+ <label for="drugs">Se s&igrave; quali, in che dosi e prescrizioni</label>
+ </div>
+ <div class="switch col s12">
+ Informazioni particolari sullo stato di salute: (postumi di operazioni, incidenti, malattie, disturbi fisici)&nbsp;&nbsp;
+ <label>
+ No
+ <input disabled name="misc_bool" type="checkbox" {% if doc.medical_data.misc_bool %}checked="checked"{%endif%}>
+ <span class="lever"></span>
+ Si
+ </label>
+ </div>
+ <div class="input-field col s12">
+ <input disabled value="{{doc.medical_data.misc}}" name="misc" id="misc" type="text">
+ <label for="misc">Se s&igrave; quali</label>
+ </div>
+ </span></div>
+ {% endif %}
+ </li>
+ {% endif %}
+ {% if doc.document_type.custom_data %}
+ <li>
+ <div class="collapsible-header">
+ <i class="material-icons">add_circle_outline</i>Dati aggiuntivi
+ </div>
+ <div class="collapsible-body"><span>
+ <table class="striped">
+ <tbody>
+ {% for key in doc|doc_key %}
+ <tr>
+ <td>{{key.key}}</td>
+ <td>{{key.value}}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </span></div>
+ </li>
+ {% endif %}
+ <li>
+ <div class="collapsible-header">
+ <i class="material-icons">attach_file</i>Allegati
+ </div>
+ <div class="collapsible-body"><span>
+ <div class="row">
+ <div class="col s12">
+ <div class="card">
+ <div class="card-image">
+ {% if doc.signed_doc %} <img class="lazyload" data-src="{{ sign_doc_file.0 }}{{ doc.id }}{{ sign_doc_file.1 }}"> {% endif %}
</div>
</div>
</div>
- {% if doc.medical_data %}
- <div class="row">
- <div class="col s12">
- <div class="card">
- <div class="card-image">
- {% if doc.medical_data.health_care_certificate %}<img class="lazyload" data-src="{{ health_file.0 }}{{ doc.id }}{{ health_file.1}}">{% endif %}
- </div>
+ </div>
+ {% if doc.medical_data %}
+ <div class="row">
+ <div class="col s12">
+ <div class="card">
+ <div class="card-image">
+ {% if doc.medical_data.health_care_certificate %}<img class="lazyload" data-src="{{ health_file.0 }}{{ doc.id }}{{ health_file.1}}">{% endif %}
</div>
</div>
</div>
- <div class="row">
- <div class="col s12">
- <div class="card">
- <div class="card-image">
- {% if doc.medical_data.vac_certificate %}<img class="lazyload" data-src="{{ vac_file.0 }}{{ doc.id }}{{ vac_file.1}}">{% endif %}
- </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <div class="card">
+ <div class="card-image">
+ {% if doc.medical_data.vac_certificate %}<img class="lazyload" data-src="{{ vac_file.0 }}{{ doc.id }}{{ vac_file.1}}">{% endif %}
</div>
</div>
</div>
- {% endif %}
- </span></div>
- </li>
- </ul>
- </span></div>
- </li>
- {% endfor %}
- </ul>
- {% endif %}
- <div class="fixed-action-btn">
- <a id="add" class="btn-floating btn-large {{color}}" href="{% url 'create'%}">
- <i class="large material-icons">add</i>
- </a>
- </div>
- {% else %}
- <div class="row">
- <div class="col l4 offset-l4 m8 offset-m2 s12">
- <div class="card">
- <div class="card-content">
- <p>Il tuo utente non &egrave; ancora stato approvato.</p>
- <br>
- {% if user_code %}
- <p>Per approvare l'utente invia il seguente codice al capo branca:</p>
- <h3 class="center-align">{{user_code}}<h3>
- {% else %}
- <p class="hide-on-small-only">Per approvare l'utente inserire prima i propri dati personali e medici cliccando il proprio nome in alto a destra. Torna in seguito su questa pagina per i prossimi passaggi.</p>
- <p class="hide-on-med-and-up">Per approvare l'utente inserire prima i propri dati personali e medici cliccando l'icona <i class="material-icons tiny">person</i> in alto. Torna in seguito su questa pagina per i prossimi passaggi.</p>
- {% endif %}
- </div>
- </div>
- </div>
- </div>
+ </div>
+ {% endif %}
+ </span></div>
+ </li>
+ </ul>
+ </span></div>
+ </li>
+ {% endfor %}
+ </ul>
{% endif %}
+ <div class="fixed-action-btn">
+ <a id="add" class="btn-floating btn-large {{color}}" href="{% url 'create'%}">
+ <i class="large material-icons">add</i>
+ </a>
+ </div>
{% else %}
<div class="row">
<div class="col l4 offset-l4 m8 offset-m2 s12">
<div class="card">
<div class="card-content">
- <p>Se hai gi&agrave; un account clicca login in alto a destra. Altrimenti clicca registrazione</p>
+ <p>Il tuo utente non &egrave; ancora stato approvato.</p>
+ <br>
+ {% if user_code %}
+ <p>Per approvare l'utente invia il seguente codice al capo branca:</p>
+ <h3 class="center-align">{{user_code}}<h3>
+ {% else %}
+ <p class="hide-on-small-only">Per approvare l'utente inserire prima i propri dati personali e medici cliccando il proprio nome in alto a destra. Torna in seguito su questa pagina per i prossimi passaggi.</p>
+ <p class="hide-on-med-and-up">Per approvare l'utente inserire prima i propri dati personali e medici cliccando l'icona <i class="material-icons tiny">person</i> in alto. Torna in seguito su questa pagina per i prossimi passaggi.</p>
+ {% endif %}
</div>
</div>
</div>
@@ -419,7 +407,6 @@
{% block script %}
$(document).ready(function(){
- {% if user.is_authenticated %}
{% if user.is_staff or perms.client.approved %}
$('.collapsible').collapsible();
$('.tap-target').tapTarget();
@@ -428,22 +415,19 @@ $(document).ready(function(){
$('.tap-target').tapTarget('open');
{% endif %}
{% endif %}
- {% endif %}
lazyload();
});
-{% 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()
- }
- {% endif %}
+{% 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()
+ }
{% endif %}
{% endblock %}
diff --git a/client/views.py b/client/views.py
index bc0b071..41bb3dd 100644
--- a/client/views.py
+++ b/client/views.py
@@ -12,109 +12,109 @@ from datetime import datetime
import pytz
from random import randint
+@login_required()
def index(request):
context = {}
group_view = False
- # check if user is logged
- if (request.user.is_authenticated):
- if not (request.user.is_staff or request.user.has_perm("client.approved")):
- # generate code if user has no code
- users = UserCode.objects.filter(user=request.user)
- code = None
- if (len(users) == 0):
- while (True):
- code = randint(100000, 999999)
- if len(UserCode.objects.filter(code=code)) == 0:
- break
- medic = MedicalData()
- medic.save()
- userCode = UserCode(user=request.user, code=code, medic=medic)
- userCode.save()
-
- user_code = None
- usercode = UserCode.objects.filter(user=request.user)[0]
- if request.user.first_name != "" and request.user.last_name != "" and request.user.email != "" and usercode.phone != "":
- user_code = "U" + str(usercode.code)
- context = {"user_code": user_code}
- else:
- # get user group
- groups = request.user.groups.all()
-
- # check if any group has enabled RO documents
- if request.user.is_staff or len(groups.filter(name="capi")) == 0:
- # if user is staff then not needed
- gr = []
- elif request.user.has_perm("client.staff"):
- gr = GroupSettings.objects.filter(group__in=groups).filter(view_documents=True).filter(~Q(group=groups[0]))
- else:
- gr = GroupSettings.objects.filter(group__in=groups).filter(view_documents=True)
-
- group_view = len(gr) != 0
-
- # user action
- if request.method == "POST":
- # get document id
- document = Document.objects.get(id=request.POST["action"][1:])
-
- # check if document is valid to modify
- if document.user != request.user:
- return
-
- if document.status == "ok" or document.status == "archive":
- return
-
- # execute action
- if request.POST["action"][0] == 'f':
- # generate approve pdf
- template = get_template('client/approve_doc_pdf.html')
- context = {'doc': document}
- html = template.render(context)
- pdf = pdfkit.from_string(html, False)
- result = BytesIO(pdf)
- result.seek(0)
- return FileResponse(result, filename=document.document_type.name+".pdf")
- elif request.POST["action"][0] == 'a':
- # sign autosign doc
- if document.status == "autosign":
- document.status = "ok"
- document.save()
- return HttpResponseRedirect("/")
- elif request.POST["action"][0] == 'd':
- # delete doc
- document.delete()
- return HttpResponseRedirect("/")
- elif request.POST["action"][0] == 'e':
- # edit doc generate context and render edit page
- document_type = document.document_type
- context = {
- 'doctype': document_type,
- }
- context['doc'] = document
- context['personal_data'] = document_type.personal_data
- context['medical_data'] = document_type.medical_data
- context['custom_data'] = document_type.custom_data
- context['keys'] = KeyVal.objects.filter(container=document)
- context['custom_message'] = document_type.custom_message
- context['custom_message_text'] = document_type.custom_message_text
- return edit_wrapper(request, context)
-
- # show only docs of the user and non archived
- documents = Document.objects.filter(
- Q(user=request.user) & ~Q(status='archive')).select_related("personal_data", "medical_data", "document_type", "user")
-
- vac_file = ["/server/media/", "/vac_certificate/doc"]
- health_file = ["/server/media/", "/health_care_certificate/doc"]
- sign_doc_file = ["/server/media/", "/signed_doc/doc"]
-
+ if not (request.user.is_staff or request.user.has_perm("client.approved")):
+ # generate code if user has no code
+ users = UserCode.objects.filter(user=request.user)
+ code = None
+ if (len(users) == 0):
+ while (True):
+ code = randint(100000, 999999)
+ if len(UserCode.objects.filter(code=code)) == 0:
+ break
+ medic = MedicalData()
+ medic.save()
+ userCode = UserCode(user=request.user, code=code, medic=medic)
+ userCode.save()
+
+ user_code = None
+ usercode = UserCode.objects.filter(user=request.user)[0]
+ if request.user.first_name != "" and request.user.last_name != "" and request.user.email != "" and usercode.phone != "":
+ user_code = "U" + str(usercode.code)
+ context = {"user_code": user_code}
+ return render(request, 'client/index.html', context)
+
+ # get user group
+ groups = request.user.groups.all()
+
+ # check if any group has enabled RO documents
+ if request.user.is_staff or len(groups.filter(name="capi")) == 0:
+ # if user is staff then not needed
+ gr = []
+ elif request.user.has_perm("client.staff"):
+ gr = GroupSettings.objects.filter(group__in=groups).filter(view_documents=True).filter(~Q(group=groups[0]))
+ else:
+ gr = GroupSettings.objects.filter(group__in=groups).filter(view_documents=True)
+
+ group_view = len(gr) != 0
+
+ # user action
+ if request.method == "POST":
+ # get document id
+ document = Document.objects.get(id=request.POST["action"][1:])
+
+ # check if document is valid to modify
+ if document.user != request.user:
+ return
+
+ if document.status == "ok" or document.status == "archive":
+ return
+
+ # execute action
+ if request.POST["action"][0] == 'f':
+ # generate approve pdf
+ template = get_template('client/approve_doc_pdf.html')
+ context = {'doc': document}
+ html = template.render(context)
+ pdf = pdfkit.from_string(html, False)
+ result = BytesIO(pdf)
+ result.seek(0)
+ return FileResponse(result, filename=document.document_type.name+".pdf")
+ elif request.POST["action"][0] == 'a':
+ # sign autosign doc
+ if document.status == "autosign":
+ document.status = "ok"
+ document.save()
+ return HttpResponseRedirect("/")
+ elif request.POST["action"][0] == 'd':
+ # delete doc
+ document.delete()
+ return HttpResponseRedirect("/")
+ elif request.POST["action"][0] == 'e':
+ # edit doc generate context and render edit page
+ document_type = document.document_type
context = {
- "docs": documents,
- "base_group": groups[0].name,
- "empty": len(documents) == 0,
- "group_view": group_view,
- "vac_file": vac_file,
- "health_file": health_file,
- "sign_doc_file": sign_doc_file
+ 'doctype': document_type,
}
+ context['doc'] = document
+ context['personal_data'] = document_type.personal_data
+ context['medical_data'] = document_type.medical_data
+ context['custom_data'] = document_type.custom_data
+ context['keys'] = KeyVal.objects.filter(container=document)
+ context['custom_message'] = document_type.custom_message
+ context['custom_message_text'] = document_type.custom_message_text
+ return edit_wrapper(request, context)
+
+ # show only docs of the user and non archived
+ documents = Document.objects.filter(
+ Q(user=request.user) & ~Q(status='archive')).select_related("personal_data", "medical_data", "document_type", "user")
+
+ vac_file = ["/server/media/", "/vac_certificate/doc"]
+ health_file = ["/server/media/", "/health_care_certificate/doc"]
+ sign_doc_file = ["/server/media/", "/signed_doc/doc"]
+
+ context = {
+ "docs": documents,
+ "base_group": groups[0].name,
+ "empty": len(documents) == 0,
+ "group_view": group_view,
+ "vac_file": vac_file,
+ "health_file": health_file,
+ "sign_doc_file": sign_doc_file
+ }
return render(request, 'client/index.html', context)
diff --git a/manager/settings.py b/manager/settings.py
index 358b0b7..b922de7 100644
--- a/manager/settings.py
+++ b/manager/settings.py
@@ -79,6 +79,7 @@ AUTHLIB_OAUTH_CLIENTS = {
'refresh_token_url': None,
'authorize_url': 'https://demo.hitobito.com/oauth/authorize',
'authorize_params': None,
+ 'api_url': "https://demo.hitobito.com/oauth/profile",
'client_kwargs': {"grant_type": "authorization_code", "scope": "with_roles"},
}
}
diff --git a/static/pbs_logo.svg b/static/pbs_logo.svg
new file mode 100644
index 0000000..2c987de
--- /dev/null
+++ b/static/pbs_logo.svg
@@ -0,0 +1 @@
+<svg id="RZ" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 198.77047 68.72007"><defs><style>.cls-1{fill:#fff;}</style></defs><path class="cls-1" d="M35.40112,51.53454c0-5.09271-1.93969-9.5553-4.84887-12.04724-2.90943,2.49194-4.84913,6.95453-4.84913,12.04724s1.9397,9.55536,4.84913,12.04724C33.46143,61.0899,35.40112,56.62725,35.40112,51.53454Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M23.06915,61.13678a10.37632,10.37632,0,0,0-2.45739-1.38959,7.42894,7.42894,0,0,0-2.68128-.43256,8.47167,8.47167,0,0,0-.96722.084q-.16407,1.85348-.252,3.67779a9.76758,9.76758,0,0,1,2.77869-.2027,12.33286,12.33286,0,0,1,3.74762.93689,22.58927,22.58927,0,0,1,3.53839,1.89643A15.458,15.458,0,0,0,23.06915,61.13678Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M22.813,74.03851a3.82145,3.82145,0,0,0,3.74365-3.74359A3.82066,3.82066,0,0,0,22.813,74.03851Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M30.48071,78.34112a5.09472,5.09472,0,0,0,0-7.059,5.09474,5.09474,0,0,0,0,7.059Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M67.80859,44.13427c.01252-.05859.02387-.11725.03351-.17694.01514-.09845.022-.21155.02942-.32355.00549-.08075.02185-.15814.02185-.24072a2.49981,2.49981,0,0,0-2.54419-2.574c-1.0896-.00525-2.49206.80584-4.39612,2.39483-.4931.41181-4.01922,3.25507-4.18212,3.38788.1629.13257,3.689,2.97565,4.18212,3.38764,1.90406,1.589,3.30652,2.40008,4.39612,2.39489a2.5,2.5,0,0,0,2.54419-2.574c0-.08258-.01636-.16-.02185-.24079-.00738-.112-.01428-.22509-.02942-.32348-.00964-.05951-.021-.11835-.03351-.17719-.0664-.329-.15808-.61609-.21728-.97015a10.13632,10.13632,0,0,1,0-2.994C67.65051,44.75054,67.74219,44.46319,67.80859,44.13427Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M38.14844,74.03851a3.82112,3.82112,0,0,0-3.74365-3.74359,3.82145,3.82145,0,0,0,3.74365,3.74359Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M52.7099,32.51532c-.06573-.014-.13147-.0268-.19849-.03754-.11041-.017-.23736-.02478-.363-.033-.09064-.00617-.17743-.02454-.27008-.02454a2.80473,2.80473,0,0,0-2.88794,2.85437c-.0058,1.22248.90417,2.796,2.68689,4.93207.462.55328,3.65143,4.509,3.80041,4.69177.14874-.1828,3.33893-4.13849,3.80121-4.69177,1.62567-1.948,2.51679-3.4245,2.6582-4.59723q-1.86181-1.59449-3.75048-3.0802c-.344.07318-.65387.16718-1.02906.22992a11.37244,11.37244,0,0,1-3.359,0C53.40137,32.69268,53.079,32.58984,52.7099,32.51532Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M45.60675,40.81878a2.5,2.5,0,0,0-2.54419,2.574c0,.08258.01642.16.02191.24072.00733.112.01428.22516.02942.32355.00958.05951.021.11834.03351.17718.06635.329.15808.61609.21729.97016a10.13715,10.13715,0,0,1,0,2.99395c-.05921.35413-.15094.64142-.21729.9704-.01251.0586-.02393.11719-.03351.17694-.01514.09845-.02209.21155-.02942.32355-.00549.08075-.02191.15814-.02191.24072a2.49986,2.49986,0,0,0,2.54419,2.574c1.08966.00525,2.49213-.80591,4.39612-2.39484.4931-.4118,4.0191-3.25464,4.18194-3.38745-.16284-.13257-3.68884-2.97607-4.18194-3.38812C48.09888,41.62469,46.69641,40.81359,45.60675,40.81878Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M41.61432,62.87377a9.4695,9.4695,0,0,1,3.76861.47822,9.70676,9.70676,0,0,1,2.54743,1.18762,3.89979,3.89979,0,0,0-.58789-3.31714,4.77212,4.77212,0,0,0-4.1687-1.90784,7.42894,7.42894,0,0,0-2.68128.43256,10.37613,10.37613,0,0,0-2.45739,1.38959,15.45787,15.45787,0,0,0-3.70673,4.57031,22.586,22.586,0,0,1,3.53833-1.89643A12.33286,12.33286,0,0,1,41.61432,62.87377Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M70.34961,43.58953c-.08087.3877-.18762.733-.258,1.154a9.41889,9.41889,0,0,0-.13671,1.85778v.00043a9.41729,9.41729,0,0,0,.13671,1.85773c.07294.43646.18573.78943.2674,1.19482.0155.07245.02954.14435.04138.21839.01856.12054.027.25946.03613.397.00672.1.027.19507.027.29663a3.78626,3.78626,0,0,1-3.57715,3.96552c-.7077,0-1.69061.059-4.08441-1.8252-.63013-.49615-6.02753-6.1015-6.03076-6.10492h-.00024l.00012-.00043h.00012c.00323-.00317,5.40063-5.60876,6.03076-6.10473a9.266,9.266,0,0,1,2.75879-1.64337Q64.44488,37.81206,63.286,36.788c-.25879.40271-.55951.83746-.95856,1.34436-.55664.707-6.84539,6.76245-6.84924,6.76605v.00025l-.00049-.00013v-.00012c-.00354-.0036-6.2926-6.059-6.849-6.766-2.11267-2.684-2.04791-3.78674-2.04791-4.58081V33.55a4.24782,4.24782,0,0,1,4.44843-4.0133c.114,0,.22113.02264.33282.03021.15454.01019.31067.01972.44647.04065.08252.01324.16345.029.24445.04626.45434.09168.85113.21827,1.34051.30011a10.86625,10.86625,0,0,0,1.58881.15326A91.43192,91.43192,0,0,0,30.55212,17.12005c-5.0512,8.16669-9.14178,18.70331-11.72943,30.28412a92.34273,92.34273,0,0,0-1.64679,9.98035,8.2547,8.2547,0,0,1,1.05585-.032,8.116,8.116,0,0,1,5.74951,2.95832,13.12072,13.12072,0,0,1,2.79468,5.39624,19.88848,19.88848,0,0,0-3.63916-1.03565,15.94422,15.94422,0,0,0-3.64941-.14123,8.50583,8.50583,0,0,0-2.8454.74121A90.39641,90.39641,0,0,0,17.1142,77.0122a105.66491,105.66491,0,0,0,12.15765,4.50153A7.06166,7.06166,0,0,1,27.646,76.95141a6.85333,6.85333,0,0,1,2.83471-5.66931,6.85331,6.85331,0,0,1,2.83472,5.66931,6.966,6.966,0,0,1-2.15485,5.11615A97.63012,97.63012,0,0,0,40.93323,84.248a105.94027,105.94027,0,0,0,25.42749,1.33618,108.607,108.607,0,0,0,9.04272-25.53253c.65747-2.94195,1.19239-5.85638,1.61035-8.72589C74.9895,48.72149,72.76343,46.13226,70.34961,43.58953Zm-46.884,5.819a17.13233,17.13233,0,0,1,7.08667-14.17321,17.13279,17.13279,0,0,1,7.08642,14.17321,17.13271,17.13271,0,0,1-7.08642,14.17322A17.13226,17.13226,0,0,1,23.46558,49.40856ZM25.05322,74.8048a5.13977,5.13977,0,0,1-4.51,1.5033,5.31512,5.31512,0,0,1,6.01343-6.01318A5.14047,5.14047,0,0,1,25.05322,74.8048Zm5.49524-5.64727a6.25175,6.25175,0,0,1-4.25195-1.4173,6.25147,6.25147,0,0,1,4.25195-1.41736,6.2515,6.2515,0,0,1,4.252,1.41736A6.25178,6.25178,0,0,1,30.54846,69.15753ZM40.418,76.3081a5.31508,5.31508,0,0,1-6.01318-6.01318A5.31482,5.31482,0,0,1,40.418,76.3081Zm9.3584-10.11829a12.08574,12.08574,0,0,1-.82813,1.74048l-1.20593-.891a15.56955,15.56955,0,0,0-2.84613-1.57983,8.98311,8.98311,0,0,0-3.2793-.92926,15.9442,15.9442,0,0,0-3.64941.14123,19.88925,19.88925,0,0,0-3.6391,1.03565A13.12131,13.12131,0,0,1,37.123,60.31085a8.116,8.116,0,0,1,5.74951-2.95832,8.32954,8.32954,0,0,1,3.37109.56678,6.70075,6.70075,0,0,1,2.81958,2.19055A6.44607,6.44607,0,0,1,49.77637,66.18981Zm4.40857-19.58807h-.00013c-.00323.00317-5.40063,5.60877-6.03082,6.10474-2.39227,1.88305-3.37524,1.82538-4.083,1.82538h-.00134a3.78619,3.78619,0,0,1-3.57715-3.965c0-.10162.02021-.19708.02692-.29663.009-.13782.01752-.27692.03619-.398.01184-.07349.02588-.14569.04126-.21784.08173-.405.19458-.75866.26752-1.19482a9.42921,9.42921,0,0,0,.13672-1.85779v-.00043a9.4272,9.4272,0,0,0-.13672-1.85772c-.07294-.43647-.18573-.78943-.2674-1.19489-.0155-.07239-.02954-.14435-.04138-.21832-.01861-.12061-.0271-.25952-.03613-.397-.00671-.1-.027-.19506-.027-.29663a3.78618,3.78618,0,0,1,3.57715-3.96551c.7077,0,1.69061-.059,4.08435,1.82519.63019.49616,6.02759,6.10151,6.03082,6.10492H54.185ZM55.556,60.131a14.16076,14.16076,0,0,1-1.31348-6.56739A14.16065,14.16065,0,0,1,55.556,46.99627a14.1615,14.1615,0,0,1,1.31342,6.56732A14.16161,14.16161,0,0,1,55.556,60.131Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M95.057,55.207h1.31446a1.98077,1.98077,0,0,0,2.25-1.99023c-.00782-1.14746-.79786-1.86963-2.29493-1.86963H94.13027v5.54736H95.057Zm0-3.00879h1.23926c.919,0,1.41309.334,1.41309,1.13965,0,.77539-.49414,1.15527-1.4209,1.15527H95.057Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M102.20839,52.63867H100.977v-.40234c0-.48633.12988-.66113.5625-.66113h.66113v-.7295h-.6836c-.91992,0-1.41308.34961-1.41308,1.43653v.35644H99.184v.75977h.91992v3.49609h.87305V53.39844h1.23144Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M106.79823,56.96289a1.30831,1.30831,0,0,0,.63868-.16016V56.1875a.7776.7776,0,0,1-.30469.06055c-.28809,0-.42481-.12891-.42481-.56153V54.0752c0-.99512-.65429-1.51954-1.71777-1.51954a2.0823,2.0823,0,0,0-2.05176,1.32911l.82813.2666a1.15972,1.15972,0,0,1,1.18554-.86621c.63868,0,.874.27343.874.59277,0,.31836-.25879.44824-1.01856.60742a4.43465,4.43465,0,0,0-1.42773.44824,1.05276,1.05276,0,0,0-.54.97266c0,.65332.47852,1.06445,1.33789,1.06445a1.71361,1.71361,0,0,0,1.65625-1.10254C105.83339,56.64355,106.11464,56.96289,106.79823,56.96289Zm-2.27246-.68457c-.501,0-.75976-.18945-.75976-.52344,0-.4414.36523-.59277,1.125-.76074.5625-.12109.83594-.22754.96484-.40234v.30371A1.37681,1.37681,0,0,1,104.52577,56.27832Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M109.808,56.94727a1.57466,1.57466,0,0,0,1.50488-.97266v.91992h.91895V50.8457h-.91895v2.64453a1.42713,1.42713,0,0,0-1.42871-.90429,1.9723,1.9723,0,0,0-1.915,2.20312C107.96913,56.22559,108.79726,56.94727,109.808,56.94727Zm.335-3.624c.86621,0,1.23828.60742,1.23828,1.43555,0,.82129-.38769,1.42871-1.24609,1.42871-.81348,0-1.22363-.53223-1.22363-1.41309C108.91152,53.90039,109.34511,53.32324,110.143,53.32324Z" transform="translate(-16.61565 -17.12005)"/><rect class="cls-1" x="96.88668" y="35.51862" width="0.92773" height="4.25586"/><path class="cls-1" d="M113.98866,51.99316a.56031.56031,0,0,0,.60059-.59277.56831.56831,0,0,0-.60059-.60791.56061.56061,0,0,0-.59961.60791A.55267.55267,0,0,0,113.98866,51.99316Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M116.62538,56.00488a1.53921,1.53921,0,0,0,1.47364.94239c1.02636,0,1.87011-.78223,1.87011-2.21094,0-1.47461-.82812-2.15039-1.80078-2.15039a1.59632,1.59632,0,0,0-1.53515.957V50.8457h-.91993v6.04883h.91211Zm1.17774-2.68164c.80566,0,1.23144.53906,1.23144,1.43555,0,.86621-.40332,1.42871-1.21582,1.42871-.88183,0-1.26172-.59277-1.26172-1.4209C116.557,53.95312,116.96718,53.32324,117.80312,53.32324Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M122.9789,56.9707a2.08471,2.08471,0,0,0,1.90039-1.01855l-.76758-.42578a1.30761,1.30761,0,0,1-2.44726-.50879h3.32128v-.31934a1.956,1.956,0,0,0-2.03711-2.14258,2.128,2.128,0,0,0-2.18066,2.2334A2.03555,2.03555,0,0,0,122.9789,56.9707Zm-.03711-3.65527a1.06061,1.06061,0,0,1,1.13965,1.124h-2.40918A1.20372,1.20372,0,0,1,122.94179,53.31543Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="111.159 39.774 112.025 36.818 112.124 36.355 112.23 36.811 113.059 39.774 114.161 39.774 115.346 35.519 114.411 35.519 113.613 38.649 113.515 39.22 113.408 38.642 112.504 35.519 111.76 35.519 110.832 38.649 110.711 39.204 110.619 38.649 109.891 35.519 108.94 35.519 110.019 39.774 111.159 39.774"/><path class="cls-1" d="M134.77382,56.9707a2.0847,2.0847,0,0,0,1.90039-1.01855l-.76758-.42578a1.30761,1.30761,0,0,1-2.44726-.50879h3.32129v-.31934a1.956,1.956,0,0,0-2.03711-2.14258,2.128,2.128,0,0,0-2.18067,2.2334A2.03555,2.03555,0,0,0,134.77382,56.9707Zm-.03711-3.65527a1.0606,1.0606,0,0,1,1.13965,1.124h-2.40918A1.20372,1.20372,0,0,1,134.73671,53.31543Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M139.39491,56.9248a1.573,1.573,0,0,0,1.49707-.958v.51758c0,1.00976-.456,1.45117-1.22363,1.45117a1.27653,1.27653,0,0,1-1.21582-.65332l-.83594.47851a2.15881,2.15881,0,0,0,1.99121.98047,2.03784,2.03784,0,0,0,2.21094-2.32519V52.63867h-.91894v.874a1.42749,1.42749,0,0,0-1.44434-.92676,1.96878,1.96878,0,0,0-1.90723,2.19629C137.54823,56.21,138.38417,56.9248,139.39491,56.9248Zm.32715-3.60156c.86621,0,1.23828.60742,1.23828,1.43555,0,.80566-.37207,1.40625-1.23144,1.40625-.8125,0-1.23828-.52442-1.23828-1.40625C138.49062,53.90039,138.92421,53.32324,139.72206,53.32324Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M144.53945,56.97754a1.5362,1.5362,0,0,0,1.46679-1.09375v1.01074h.91992V52.63867h-.92773v2.082c0,.91992-.418,1.48242-1.0791,1.48242-.73633,0-.98731-.47167-.98731-1.209V52.63867h-.91992v2.60645C143.0121,56.28613,143.50624,56.97754,144.53945,56.97754Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M149.1,54.79688c0-.93458.4336-1.47364,1.11719-1.47364.75195,0,1.02539.47071,1.02539,1.208v2.36328h.92773V54.2959A1.57735,1.57735,0,0,0,149.1,53.64941V52.63867h-.91894v4.25586H149.1Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M155.00527,56.9248a1.573,1.573,0,0,0,1.49707-.958v.51758c0,1.00976-.45606,1.45117-1.22364,1.45117a1.27653,1.27653,0,0,1-1.21582-.65332l-.83593.47851a2.15878,2.15878,0,0,0,1.99121.98047,2.03783,2.03783,0,0,0,2.21093-2.32519V52.63867h-.91894v.874a1.42748,1.42748,0,0,0-1.44434-.92676,1.96878,1.96878,0,0,0-1.90722,2.19629C153.15859,56.21,153.99452,56.9248,155.00527,56.9248Zm.32714-3.60156c.86621,0,1.23829.60742,1.23829,1.43555,0,.80566-.37208,1.40625-1.23145,1.40625-.8125,0-1.23828-.52442-1.23828-1.40625C154.101,53.90039,154.53456,53.32324,155.33241,53.32324Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M162.86366,56.11133a1.999,1.999,0,0,1-1.77832-.919l-.77441.64551a2.86766,2.86766,0,0,0,2.48437,1.13965c1.27637,0,2.0293-.69141,2.0293-1.67188,0-1.13964-1.0039-1.375-1.92285-1.542-.84375-.14453-1.5127-.251-1.5127-.86621,0-.418.34961-.7832,1.07227-.7832a1.7404,1.7404,0,0,1,1.61816.88183l.81348-.60839a2.66515,2.66515,0,0,0-2.34082-1.13135c-1.32227,0-2.03613.74463-2.03613,1.62549,0,1.10937.9414,1.36035,1.90722,1.5205.78223.13672,1.52735.25782,1.52735.88868C163.95058,55.76172,163.5707,56.11133,162.86366,56.11133Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M167.81874,56.9707a1.95612,1.95612,0,0,0,2.05176-1.60351l-.93457-.19824c-.13672.63085-.43262,1.01855-1.11719,1.01855-.85058,0-1.21582-.57715-1.21582-1.4209,0-.83594.40332-1.44336,1.21582-1.44336a1.04891,1.04891,0,0,1,1.10254,1.01758l.94141-.20508a1.86549,1.86549,0,0,0-2.02051-1.58008,2.07951,2.07951,0,0,0-2.17383,2.21094A2.02125,2.02125,0,0,0,167.81874,56.9707Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M171.74843,54.79688c0-.93458.43262-1.47364,1.124-1.47364.74512,0,1.01856.47071,1.01856,1.208v2.36328h.91992V54.2959a1.52764,1.52764,0,0,0-1.543-1.74024,1.56608,1.56608,0,0,0-1.52734,1.10157V50.8457h-.91211v6.04883h.91992Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="161.212 39.774 162.078 36.818 162.177 36.355 162.283 36.811 163.111 39.774 164.214 39.774 165.398 35.519 164.464 35.519 163.666 38.649 163.567 39.22 163.461 38.642 162.557 35.519 161.812 35.519 160.885 38.649 160.764 39.204 160.672 38.649 159.943 35.519 158.993 35.519 160.072 39.774 161.212 39.774"/><path class="cls-1" d="M184.67616,56.9707a2.08418,2.08418,0,0,0,1.89942-1.01855l-.76758-.42578a1.30761,1.30761,0,0,1-2.44727-.50879H186.682v-.31934a1.956,1.956,0,0,0-2.03711-2.14258,2.128,2.128,0,0,0-2.18066,2.2334A2.03583,2.03583,0,0,0,184.67616,56.9707Zm-.03808-3.65527a1.06061,1.06061,0,0,1,1.13965,1.124h-2.40918A1.20372,1.20372,0,0,1,184.63808,53.31543Z" transform="translate(-16.61565 -17.12005)"/><rect class="cls-1" x="170.91696" y="35.51862" width="0.92773" height="4.25586"/><path class="cls-1" d="M188.01894,51.99316a.56031.56031,0,0,0,.60058-.59277.56831.56831,0,0,0-.60058-.60791.56061.56061,0,0,0-.59961.60791A.55266.55266,0,0,0,188.01894,51.99316Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="176.525 38.977 173.798 38.977 176.487 36.286 176.487 35.519 172.901 35.519 172.901 36.316 175.538 36.316 172.855 38.999 172.855 39.774 176.525 39.774 176.525 38.977"/><polygon class="cls-1" points="80.561 48.095 80.447 48.482 80.342 48.087 78.776 43.786 77.515 43.786 77.515 49.333 78.419 49.333 78.419 45.374 78.373 44.576 78.602 45.366 80.067 49.333 80.805 49.333 82.287 45.366 82.515 44.538 82.469 45.374 82.469 49.333 83.365 49.333 83.365 43.786 82.15 43.794 80.561 48.095"/><path class="cls-1" d="M103.21913,62.11426a2.082,2.082,0,0,0-2.18066,2.21191,2.04779,2.04779,0,0,0,2.18066,2.20313,2.20778,2.20778,0,0,0,0-4.415Zm0,3.63281c-.873,0-1.23828-.57812-1.23828-1.4209,0-.83594.40235-1.44433,1.23828-1.44433.85157,0,1.23145.585,1.23145,1.44433C104.45058,65.16113,104.07851,65.74707,103.21913,65.74707Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M109.34413,64.28027c0,.91895-.418,1.48145-1.0791,1.48145-.73633,0-.9873-.4707-.9873-1.208V62.19824h-.91993v2.60645c0,1.041.49415,1.73242,1.52735,1.73242a1.53716,1.53716,0,0,0,1.4668-1.09473v1.01074h.91992V62.19824h-.92774Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="98.847 45.078 97.92 45.078 96.825 47.859 96.62 48.505 96.415 47.859 95.359 45.078 94.401 45.078 96.119 49.333 97.084 49.333 98.847 45.078"/><path class="cls-1" d="M118.16054,62.11426a2.12876,2.12876,0,0,0-2.18067,2.23437,2.03512,2.03512,0,0,0,2.21192,2.18067,2.08228,2.08228,0,0,0,1.89941-1.01856l-.76758-.4248a1.308,1.308,0,0,1-2.44726-.50977h3.32129v-.31933A1.95644,1.95644,0,0,0,118.16054,62.11426ZM116.88417,63.999a1.20385,1.20385,0,0,1,1.26953-1.125,1.06134,1.06134,0,0,1,1.13965,1.125Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M126.92323,64.083v2.37011h.91895V63.84668c0-1.0332-.50879-1.73242-1.459-1.73242a1.55446,1.55446,0,0,0-1.48926,1.06445,1.3064,1.3064,0,0,0-1.35254-1.06445,1.4497,1.4497,0,0,0-1.42871,1.0791v-.99512h-.91895v4.25488h.91895V64.35645c0-.93457.36523-1.47461,1.0332-1.47461.69922,0,.91211.45605.91211,1.19336v2.37792h.91992v-2.1123c0-.93457.36426-1.459,1.0332-1.459C126.71034,62.88184,126.92323,63.35352,126.92323,64.083Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M128.83144,64.34863a2.03511,2.03511,0,0,0,2.21191,2.18067,2.08231,2.08231,0,0,0,1.89942-1.01856l-.76758-.4248a1.308,1.308,0,0,1-2.44727-.50977h3.32129v-.31933a1.95644,1.95644,0,0,0-2.03711-2.14258A2.12875,2.12875,0,0,0,128.83144,64.34863Zm3.31347-.34961h-2.40918a1.20385,1.20385,0,0,1,1.26954-1.125A1.06134,1.06134,0,0,1,132.14491,63.999Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M134.96425,64.35645c0-.93457.43359-1.47461,1.11719-1.47461.752,0,1.02539.47168,1.02539,1.208v2.36328h.92773V63.85449a1.57718,1.57718,0,0,0-3.07031-.64551V62.19824h-.91895v4.25488h.91895Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M141.8578,62.958v-.75977h-1.20117V60.59473l-.8584.5166v1.08691h-.98046V62.958h.97265v2.14258c0,.94238.37207,1.42871,1.292,1.42871a1.69531,1.69531,0,0,0,.77539-.167v-.74511a1.26723,1.26723,0,0,1-.5625.12207c-.418,0-.63867-.19727-.63867-.74512V62.958Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M146.62343,61.67383a1.73964,1.73964,0,0,1,1.61816.88086l.81348-.60742a2.66443,2.66443,0,0,0-2.34082-1.13184c-1.32227,0-2.03613.74414-2.03613,1.626,0,1.10937.9414,1.36035,1.90722,1.51953.78223.13672,1.52735.25879,1.52735.88867,0,.47168-.37989.82129-1.08692.82129a1.99776,1.99776,0,0,1-1.77832-.91992l-.77441.64648a2.86766,2.86766,0,0,0,2.48437,1.13965c1.27637,0,2.0293-.69141,2.0293-1.67188,0-1.13964-1.00391-1.375-1.92285-1.543-.84375-.14356-1.5127-.25-1.5127-.86622C145.55116,62.03809,145.90077,61.67383,146.62343,61.67383Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M151.82851,62.88184a1.04907,1.04907,0,0,1,1.10254,1.01855l.9414-.20508a1.86543,1.86543,0,0,0-2.0205-1.581,2.08027,2.08027,0,0,0-2.17383,2.21191,2.0205,2.0205,0,0,0,2.15039,2.20313,1.9553,1.9553,0,0,0,2.05176-1.60352l-.93457-.19726c-.13672.63086-.43262,1.01855-1.11719,1.01855-.85059,0-1.21582-.57812-1.21582-1.4209C150.61269,63.49023,151.016,62.88184,151.82851,62.88184Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M154.59511,64.32617a2.04779,2.04779,0,0,0,2.18066,2.20313,2.20769,2.20769,0,1,0-2.18066-2.20313Zm3.41211,0c0,.835-.37207,1.4209-1.23145,1.4209-.873,0-1.23828-.57812-1.23828-1.4209,0-.83594.40235-1.44433,1.23828-1.44433C157.62734,62.88184,158.00722,63.4668,158.00722,64.32617Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M161.29042,66.53711a1.53717,1.53717,0,0,0,1.4668-1.09473v1.01074h.91992V62.19824h-.92773v2.082c0,.91895-.418,1.48145-1.07911,1.48145-.73632,0-.9873-.4707-.9873-1.208V62.19824h-.91992v2.60645C159.76308,65.8457,160.25722,66.53711,161.29042,66.53711Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M164.49745,62.958h.97266v2.14258c0,.94238.37207,1.42871,1.292,1.42871a1.69531,1.69531,0,0,0,.77539-.167v-.74511a1.26723,1.26723,0,0,1-.5625.12207c-.418,0-.63867-.19727-.63867-.74512V62.958h1.20117v-.75977h-1.20117V60.59473l-.8584.5166v1.08691h-.98047Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M177.75185,66.5293a2.08228,2.08228,0,0,0,1.89941-1.01856l-.76758-.4248a1.308,1.308,0,0,1-2.44726-.50977h3.32129v-.31933a1.95644,1.95644,0,0,0-2.03711-2.14258,2.12876,2.12876,0,0,0-2.18067,2.23437A2.03512,2.03512,0,0,0,177.75185,66.5293Zm-.03809-3.65528a1.06135,1.06135,0,0,1,1.13965,1.125h-2.40918A1.20385,1.20385,0,0,1,177.71376,62.874Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M182.58583,62.44141c0,1.10937.94141,1.36035,1.90723,1.51953.78223.13672,1.52734.25879,1.52734.88867,0,.47168-.37988.82129-1.08691.82129a1.99776,1.99776,0,0,1-1.77832-.91992l-.77442.64648a2.86767,2.86767,0,0,0,2.48438,1.13965c1.27637,0,2.0293-.69141,2.0293-1.67188,0-1.13964-1.00391-1.375-1.92286-1.543-.84375-.14356-1.51269-.25-1.51269-.86622,0-.418.34961-.78222,1.07226-.78222a1.73966,1.73966,0,0,1,1.61817.88086l.81348-.60742a2.66447,2.66447,0,0,0-2.34083-1.13184C183.2997,60.81543,182.58583,61.55957,182.58583,62.44141Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M191.81923,66.45312V62.19824h-.92773v2.082c0,.91895-.418,1.48145-1.07911,1.48145-.73632,0-.9873-.4707-.9873-1.208V62.19824h-.91992v2.60645c0,1.041.49414,1.73242,1.52734,1.73242a1.53715,1.53715,0,0,0,1.4668-1.09473v1.01074Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M193.5663,61.55176a.56032.56032,0,0,0,.60059-.59278.56818.56818,0,0,0-.60059-.60742.56047.56047,0,0,0-.59961.60742A.55267.55267,0,0,0,193.5663,61.55176Z" transform="translate(-16.61565 -17.12005)"/><rect class="cls-1" x="176.46432" y="45.07819" width="0.92773" height="4.25488"/><path class="cls-1" d="M196.94814,65.76953a1.64119,1.64119,0,0,1-1.41309-.707l-.66894.63086a2.49463,2.49463,0,0,0,2.05957.85156c1.06445,0,1.69431-.58594,1.69431-1.36816,0-.85059-.74412-1.04883-1.57224-1.16992-.72266-.10645-1.21582-.18262-1.21582-.57032,0-.2959.23535-.5625.82812-.5625a1.49445,1.49445,0,0,1,1.33008.69922l.70605-.60058a2.366,2.366,0,0,0-1.98339-.873c-1.06348,0-1.68653.585-1.68653,1.3291,0,.75977.5625,1.01856,1.33692,1.14063.7832.1289,1.43652.167,1.43652.60742C197.7997,65.48047,197.54872,65.76953,196.94814,65.76953Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M201.33388,65.76953a1.6412,1.6412,0,0,1-1.41309-.707l-.66894.63086a2.49465,2.49465,0,0,0,2.05957.85156c1.06347,0,1.69433-.58594,1.69433-1.36816,0-.85059-.74414-1.04883-1.57226-1.16992-.72266-.10645-1.21582-.18262-1.21582-.57032,0-.2959.23535-.5625.82812-.5625a1.49172,1.49172,0,0,1,1.3291.69922l.707-.60058a2.366,2.366,0,0,0-1.9834-.873c-1.06348,0-1.68653.585-1.68653,1.3291,0,.75977.5625,1.01856,1.33692,1.14063.7832.1289,1.43652.167,1.43652.60742C202.18544,65.48047,201.93446,65.76953,201.33388,65.76953Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M207.93056,65.51074l-.76758-.4248a1.308,1.308,0,0,1-2.44727-.50977H208.037v-.31933a1.95644,1.95644,0,0,0-2.03711-2.14258,2.12875,2.12875,0,0,0-2.18066,2.23437,2.03512,2.03512,0,0,0,2.21191,2.18067A2.0823,2.0823,0,0,0,207.93056,65.51074Zm-1.9375-2.63672a1.06135,1.06135,0,0,1,1.13965,1.125h-2.40918A1.20383,1.20383,0,0,1,205.99306,62.874Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="80.561 57.653 80.447 58.041 80.342 57.646 78.776 53.345 77.515 53.345 77.515 58.892 78.419 58.892 78.419 54.933 78.373 54.135 78.602 54.925 80.067 58.892 80.805 58.892 82.287 54.925 82.515 54.097 82.469 54.933 82.469 58.892 83.365 58.892 83.365 53.345 82.15 53.353 80.561 57.653"/><path class="cls-1" d="M103.21913,71.67285a2.08173,2.08173,0,0,0-2.18066,2.21094,2.04806,2.04806,0,0,0,2.18066,2.2041,2.20778,2.20778,0,0,0,0-4.415Zm0,3.63281c-.873,0-1.23828-.57812-1.23828-1.42187,0-.835.40235-1.44336,1.23828-1.44336.85157,0,1.23145.585,1.23145,1.44336C104.45058,74.71973,104.07851,75.30566,103.21913,75.30566Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="91.566 57.418 91.361 58.064 91.156 57.418 90.101 54.637 89.143 54.637 90.86 58.892 91.825 58.892 93.588 54.637 92.661 54.637 91.566 57.418"/><rect class="cls-1" x="94.34079" y="54.63678" width="0.92773" height="4.25488"/><path class="cls-1" d="M111.44277,69.91016a.56046.56046,0,0,0-.59961.60742.55266.55266,0,0,0,.59961.59277.56031.56031,0,0,0,.60058-.59277A.56817.56817,0,0,0,111.44277,69.91016Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M118.34218,71.67285a1.55449,1.55449,0,0,0-1.48926,1.06445,1.3064,1.3064,0,0,0-1.35254-1.06445,1.44971,1.44971,0,0,0-1.42871,1.0791v-.99511h-.91894v4.25488h.91894V73.915c0-.93457.36524-1.47461,1.0332-1.47461.69922,0,.91211.456.91211,1.19336v2.37793h.91993V73.89941c0-.93457.36425-1.459,1.0332-1.459.69922,0,.91211.4707.91211,1.20019v2.3711h.91894V73.40527C119.80116,72.37207,119.29237,71.67285,118.34218,71.67285Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M122.97109,71.67285a2.12877,2.12877,0,0,0-2.18067,2.23438,2.03512,2.03512,0,0,0,2.21192,2.18066,2.08231,2.08231,0,0,0,1.89941-1.01855l-.76758-.42481a1.308,1.308,0,0,1-2.44726-.50976h3.32129v-.31934A1.95644,1.95644,0,0,0,122.97109,71.67285Zm-1.27639,1.88477a1.20387,1.20387,0,0,1,1.26955-1.125,1.06135,1.06135,0,0,1,1.13965,1.125Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M128.43593,71.67285a1.53614,1.53614,0,0,0-1.5127,1.09473V71.75684h-.91894v4.25488h.91894V73.915c0-.93457.4336-1.47461,1.11719-1.47461.75195,0,1.02539.4707,1.02539,1.208v2.36328h.92774V73.41309A1.53846,1.53846,0,0,0,128.43593,71.67285Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M132.61562,70.15332l-.8584.5166v1.08692h-.98047v.75976h.97266v2.14258c0,.94238.37207,1.42871,1.292,1.42871a1.69547,1.69547,0,0,0,.77539-.167v-.74512a1.2671,1.2671,0,0,1-.5625.12207c-.418,0-.63867-.19824-.63867-.74512V72.5166h1.20117v-.75976h-1.20117Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M138.93105,73.88379a2.17751,2.17751,0,1,0-4.3545,0,2.04806,2.04806,0,0,0,2.18067,2.2041A2.08586,2.08586,0,0,0,138.93105,73.88379Zm-2.17383,1.42187c-.873,0-1.23828-.57812-1.23828-1.42187,0-.835.40234-1.44336,1.23828-1.44336.85156,0,1.23144.585,1.23144,1.44336C137.98866,74.71973,137.61659,75.30566,136.75722,75.30566Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M146.098,74.42383c0-1.13965-1.00391-1.375-1.92285-1.543-.84375-.14356-1.5127-.25-1.5127-.86621,0-.418.34961-.78223,1.07227-.78223a1.73964,1.73964,0,0,1,1.61816.88086l.81348-.60742a2.66444,2.66444,0,0,0-2.34082-1.13184c-1.32227,0-2.03613.74414-2.03613,1.626,0,1.10938.9414,1.36035,1.90722,1.51953.78223.13672,1.52735.25879,1.52735.88867,0,.47168-.37989.82129-1.08692.82129a1.99776,1.99776,0,0,1-1.77832-.91992l-.77441.64648a2.86761,2.86761,0,0,0,2.48437,1.13965C145.34511,76.0957,146.098,75.4043,146.098,74.42383Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M150.057,74.28711c-.13672.63086-.43261,1.01855-1.11718,1.01855-.85059,0-1.21582-.57812-1.21582-1.42187,0-.835.40332-1.44336,1.21582-1.44336a1.04906,1.04906,0,0,1,1.10253,1.01855l.94141-.20507a1.86544,1.86544,0,0,0-2.02051-1.58106,2.08,2.08,0,0,0-2.17382,2.21094,2.02078,2.02078,0,0,0,2.15039,2.2041,1.95529,1.95529,0,0,0,2.05175-1.60351Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M156.06191,73.88379a2.17751,2.17751,0,1,0-4.3545,0,2.04806,2.04806,0,0,0,2.18067,2.2041A2.08586,2.08586,0,0,0,156.06191,73.88379Zm-2.17383,1.42187c-.87305,0-1.23828-.57812-1.23828-1.42187,0-.835.40234-1.44336,1.23828-1.44336.85156,0,1.23144.585,1.23144,1.44336C155.11952,74.71973,154.74745,75.30566,153.88808,75.30566Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M159.86855,76.01172h.91992V71.75684h-.92774v2.082c0,.91894-.418,1.48144-1.0791,1.48144-.73633,0-.9873-.4707-.9873-1.208V71.75684h-.91992v2.60644c0,1.041.49414,1.73242,1.52734,1.73242a1.53717,1.53717,0,0,0,1.4668-1.09472Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M164.6498,72.5166v-.75976h-1.20118V70.15332l-.85839.5166v1.08692h-.98047v.75976h.97265v2.14258c0,.94238.37207,1.42871,1.292,1.42871a1.6955,1.6955,0,0,0,.77539-.167v-.74512a1.26713,1.26713,0,0,1-.5625.12207c-.418,0-.63868-.19824-.63868-.74512V72.5166Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M169.41542,71.23242a1.73967,1.73967,0,0,1,1.61817.88086l.81347-.60742a2.66442,2.66442,0,0,0-2.34082-1.13184c-1.32226,0-2.03613.74414-2.03613,1.626,0,1.10938.94141,1.36035,1.90723,1.51953.78222.13672,1.52734.25879,1.52734.88867,0,.47168-.37988.82129-1.08691.82129a1.99774,1.99774,0,0,1-1.77832-.91992l-.7754.64648a2.8707,2.8707,0,0,0,2.48536,1.13965c1.27636,0,2.02929-.6914,2.02929-1.67187,0-1.13965-1.0039-1.375-1.92285-1.543-.84375-.14356-1.51269-.25-1.51269-.86621C168.34316,71.59668,168.69277,71.23242,169.41542,71.23242Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="158.149 57.418 157.944 58.064 157.739 57.418 156.684 54.637 155.726 54.637 157.443 58.892 158.408 58.892 160.171 54.637 159.244 54.637 158.149 57.418"/><rect class="cls-1" x="160.92379" y="54.63678" width="0.92773" height="4.25488"/><path class="cls-1" d="M178.02577,69.91016a.56046.56046,0,0,0-.59961.60742.55266.55266,0,0,0,.59961.59277.56031.56031,0,0,0,.60059-.59277A.56817.56817,0,0,0,178.02577,69.91016Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="166.531 58.094 163.804 58.094 166.493 55.404 166.493 54.637 162.907 54.637 162.907 55.435 165.544 55.435 162.861 58.117 162.861 58.892 166.531 58.892 166.531 58.094"/><polygon class="cls-1" points="167.277 58.892 170.947 58.892 170.947 58.094 168.22 58.094 170.909 55.404 170.909 54.637 167.323 54.637 167.323 55.435 169.96 55.435 167.277 58.117 167.277 58.892"/><path class="cls-1" d="M192.4496,75.06934l-.76758-.42481a1.308,1.308,0,0,1-2.44726-.50976h3.32129v-.31934a1.95644,1.95644,0,0,0-2.03711-2.14258,2.12877,2.12877,0,0,0-2.18067,2.23438,2.03483,2.03483,0,0,0,2.21094,2.18066A2.08283,2.08283,0,0,0,192.4496,75.06934Zm-1.9375-2.63672a1.06135,1.06135,0,0,1,1.13965,1.125h-2.40918A1.20385,1.20385,0,0,1,190.5121,72.43262Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M196.3871,71.86328a1.47075,1.47075,0,0,0-.7373-.168c-.62305,0-.98731.34278-1.17774,1.08692V71.75684h-.91894v4.25488h.91894v-2.1582c0-.89649.40332-1.33692.93457-1.33692a1.2955,1.2955,0,0,1,.72168.18945Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M198.8412,71.67285a2.08173,2.08173,0,0,0-2.18066,2.21094,2.04806,2.04806,0,0,0,2.18066,2.2041,2.20778,2.20778,0,0,0,0-4.415Zm0,3.63281c-.873,0-1.23828-.57812-1.23828-1.42187,0-.835.40235-1.44336,1.23828-1.44336.85157,0,1.23145.585,1.23145,1.44336C200.07265,74.71973,199.70058,75.30566,198.8412,75.30566Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="80.561 67.212 80.447 67.6 80.342 67.204 78.776 62.903 77.515 62.903 77.515 68.45 78.419 68.45 78.419 64.491 78.373 63.693 78.602 64.483 80.067 68.45 80.805 68.45 82.287 64.483 82.515 63.655 82.469 64.491 82.469 68.45 83.365 68.45 83.365 62.903 82.15 62.911 80.561 67.212"/><path class="cls-1" d="M103.21913,81.23145a2.082,2.082,0,0,0-2.18066,2.21191,2.04778,2.04778,0,0,0,2.18066,2.20312,2.20778,2.20778,0,0,0,0-4.415Zm0,3.63281c-.873,0-1.23828-.57813-1.23828-1.4209,0-.83594.40235-1.44434,1.23828-1.44434.85157,0,1.23145.585,1.23145,1.44434C104.45058,84.27832,104.07851,84.86426,103.21913,84.86426Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="91.566 66.977 91.361 67.622 91.156 66.977 90.101 64.195 89.143 64.195 90.86 68.45 91.825 68.45 93.588 64.195 92.661 64.195 91.566 66.977"/><rect class="cls-1" x="94.34079" y="64.19538" width="0.92773" height="4.25488"/><path class="cls-1" d="M111.44277,79.46875a.56047.56047,0,0,0-.59961.60742.55267.55267,0,0,0,.59961.59278.56031.56031,0,0,0,.60058-.59278A.56817.56817,0,0,0,111.44277,79.46875Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M118.34218,81.23145a1.55447,1.55447,0,0,0-1.48926,1.06445,1.3064,1.3064,0,0,0-1.35254-1.06445,1.44971,1.44971,0,0,0-1.42871,1.0791v-.99512h-.91894v4.25488h.91894V83.47363c0-.93457.36524-1.47461,1.0332-1.47461.69922,0,.91211.45606.91211,1.19336v2.37793h.91993V83.458c0-.93457.36425-1.459,1.0332-1.459.69922,0,.91211.47168.91211,1.20118v2.37011h.91894V82.96387C119.80116,81.93066,119.29237,81.23145,118.34218,81.23145Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M122.97109,81.23145a2.12876,2.12876,0,0,0-2.18067,2.23437,2.03512,2.03512,0,0,0,2.21192,2.18066,2.08229,2.08229,0,0,0,1.89941-1.01855l-.76758-.42481a1.308,1.308,0,0,1-2.44726-.50976h3.32129V83.374A1.95644,1.95644,0,0,0,122.97109,81.23145Zm-1.27639,1.88476a1.20387,1.20387,0,0,1,1.26955-1.125,1.06135,1.06135,0,0,1,1.13965,1.125Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M128.43593,81.23145a1.53614,1.53614,0,0,0-1.5127,1.09472V81.31543h-.91894v4.25488h.91894V83.47363c0-.93457.4336-1.47461,1.11719-1.47461.75195,0,1.02539.47168,1.02539,1.208v2.36328h.92774V82.97168A1.53845,1.53845,0,0,0,128.43593,81.23145Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M132.61562,79.71191l-.8584.51661v1.08691h-.98047v.75977h.97266v2.14257c0,.94239.37207,1.42871,1.292,1.42871a1.69534,1.69534,0,0,0,.77539-.167v-.74511a1.26723,1.26723,0,0,1-.5625.12207c-.418,0-.63867-.19727-.63867-.74512V82.0752h1.20117v-.75977h-1.20117Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M140.1703,82.70605a1.26528,1.26528,0,0,0,1.16993-1.28417c0-.85157-.55469-1.39844-1.877-1.39844h-2.56054v5.54687h2.52246c1.33008,0,2.06738-.501,2.06738-1.5039A1.32131,1.32131,0,0,0,140.1703,82.70605Zm-2.34082-1.877h1.42872c.88964,0,1.19335.30371,1.19335.76758,0,.501-.37988.83594-1.23144.83594h-1.39063Zm1.49707,3.92871h-1.49707V83.10059h1.48926c.88965,0,1.26953.25879,1.26953.77539C140.58827,84.37012,140.31484,84.75781,139.32655,84.75781Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M146.05995,84.3623V82.751c0-.99512-.65332-1.51953-1.71777-1.51953a2.0818,2.0818,0,0,0-2.05176,1.33007l.82813.26563a1.15972,1.15972,0,0,1,1.18554-.86621c.63868,0,.874.27344.874.59277s-.25782.44824-1.01856.6084a4.40181,4.40181,0,0,0-1.42871.44824,1.05383,1.05383,0,0,0-.53906.97266c0,.65332.47851,1.06347,1.33789,1.06347a1.71189,1.71189,0,0,0,1.65625-1.10156c0,.77442.28125,1.09375.96484,1.09375a1.31981,1.31981,0,0,0,.63868-.15918v-.61523a.77778.77778,0,0,1-.30469.06054C146.19667,84.9248,146.05995,84.7959,146.05995,84.3623Zm-.85156-.79a1.37745,1.37745,0,0,1-1.33008,1.38281c-.501,0-.75976-.19043-.75976-.52442,0-.44043.36523-.59277,1.125-.75976.5625-.12207.83593-.22754.96484-.40235Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M148.80409,79.71191l-.85839.51661v1.08691h-.98047v.75977h.97265v2.14257c0,.94239.37207,1.42871,1.292,1.42871a1.69539,1.69539,0,0,0,.7754-.167v-.74511a1.26729,1.26729,0,0,1-.5625.12207c-.418,0-.63868-.19727-.63868-.74512V82.0752h1.20118v-.75977h-1.20118Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M152.39882,79.71191l-.8584.51661v1.08691h-.98047v.75977h.97266v2.14257c0,.94239.37207,1.42871,1.292,1.42871a1.69531,1.69531,0,0,0,.77539-.167v-.74511a1.26723,1.26723,0,0,1-.5625.12207c-.418,0-.63867-.19727-.63867-.74512V82.0752H153.6v-.75977h-1.20117Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M158.19765,84.3623V82.751c0-.99512-.6543-1.51953-1.71778-1.51953a2.08179,2.08179,0,0,0-2.05175,1.33007l.82812.26563a1.15972,1.15972,0,0,1,1.18555-.86621c.63867,0,.874.27344.874.59277s-.25879.44824-1.01855.6084a4.38568,4.38568,0,0,0-1.42774.44824,1.05276,1.05276,0,0,0-.54.97266c0,.65332.47852,1.06347,1.33789,1.06347a1.71278,1.71278,0,0,0,1.65625-1.10156c0,.77442.28125,1.09375.96485,1.09375a1.31977,1.31977,0,0,0,.63867-.15918v-.61523a.77778.77778,0,0,1-.30469.06054C158.33437,84.9248,158.19765,84.7959,158.19765,84.3623Zm-.85156-.79a1.37746,1.37746,0,0,1-1.33008,1.38281c-.501,0-.75977-.19043-.75977-.52442,0-.44043.36524-.59277,1.125-.75976.5625-.12207.83594-.22754.96485-.40235Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M161.0697,81.99121a1.49175,1.49175,0,0,1,1.32912.69922l.707-.60059a2.366,2.366,0,0,0-1.9834-.873c-1.06347,0-1.68652.585-1.68652,1.3291,0,.75976.5625,1.01855,1.33691,1.14062.78321.12891,1.43653.167,1.43653.60743,0,.30371-.251.59277-.85157.59277a1.64127,1.64127,0,0,1-1.4131-.707l-.66893.63086a2.49466,2.49466,0,0,0,2.05957.85156c1.06348,0,1.69434-.58594,1.69434-1.36816,0-.85059-.74414-1.04883-1.57227-1.16993-.72265-.10644-1.21582-.18261-1.21582-.57031C160.24159,82.25781,160.47695,81.99121,161.0697,81.99121Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M166.0248,81.23145a2.12876,2.12876,0,0,0-2.18067,2.23437,2.03483,2.03483,0,0,0,2.21094,2.18066,2.08281,2.08281,0,0,0,1.90039-1.01855l-.76758-.42481a1.308,1.308,0,0,1-2.44726-.50976h3.32129V83.374A1.95643,1.95643,0,0,0,166.0248,81.23145Zm-1.27637,1.88476a1.20383,1.20383,0,0,1,1.26953-1.125,1.06135,1.06135,0,0,1,1.13965,1.125Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M171.48964,81.23145a1.53613,1.53613,0,0,0-1.51269,1.09472V81.31543H169.058v4.25488h.91895V83.47363c0-.93457.43359-1.47461,1.11718-1.47461.752,0,1.02539.47168,1.02539,1.208v2.36328h.92774V82.97168A1.53845,1.53845,0,0,0,171.48964,81.23145Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M177.37929,82.166a1.42842,1.42842,0,0,0-1.42871-.9043,1.97265,1.97265,0,0,0-1.915,2.2041c0,1.43652.82812,2.1582,1.83887,2.1582a1.57468,1.57468,0,0,0,1.50488-.97265v.91894h.91894V79.52148h-.91894Zm-1.17774,2.69824c-.81347,0-1.22363-.53223-1.22363-1.41406,0-.874.4336-1.45118,1.23145-1.45118.86621,0,1.23828.6084,1.23828,1.43653C177.44765,84.25586,177.05995,84.86426,176.20155,84.86426Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M183.1703,84.3623V82.751c0-.99512-.65429-1.51953-1.71777-1.51953a2.08181,2.08181,0,0,0-2.05176,1.33007l.82813.26563a1.15972,1.15972,0,0,1,1.18555-.86621c.63867,0,.874.27344.874.59277s-.25879.44824-1.01856.6084a4.3856,4.3856,0,0,0-1.42773.44824,1.05276,1.05276,0,0,0-.54.97266c0,.65332.47852,1.06347,1.33789,1.06347a1.71278,1.71278,0,0,0,1.65625-1.10156c0,.77442.28125,1.09375.96484,1.09375a1.31978,1.31978,0,0,0,.63868-.15918v-.61523a.77778.77778,0,0,1-.30469.06054C183.307,84.9248,183.1703,84.7959,183.1703,84.3623Zm-.85156-.79a1.37745,1.37745,0,0,1-1.33008,1.38281c-.501,0-.75976-.19043-.75976-.52442,0-.44043.36523-.59277,1.125-.75976.5625-.12207.83594-.22754.96484-.40235Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M186.04335,81.99121a1.49445,1.49445,0,0,1,1.33008.69922l.706-.60059a2.366,2.366,0,0,0-1.98339-.873c-1.06348,0-1.68653.585-1.68653,1.3291,0,.75976.5625,1.01855,1.33692,1.14062.7832.12891,1.43652.167,1.43652.60743,0,.30371-.251.59277-.85156.59277a1.64121,1.64121,0,0,1-1.41309-.707l-.66894.63086a2.49463,2.49463,0,0,0,2.05957.85156c1.06445,0,1.69433-.58594,1.69433-1.36816,0-.85059-.74414-1.04883-1.57226-1.16993-.72266-.10644-1.21582-.18261-1.21582-.57031C185.21523,82.25781,185.45058,81.99121,186.04335,81.99121Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M192.82265,80.791a1.73964,1.73964,0,0,1,1.61816.88086l.81348-.60743a2.66442,2.66442,0,0,0-2.34082-1.13183c-1.32227,0-2.03613.74414-2.03613,1.626,0,1.10938.9414,1.36036,1.90722,1.51953.78223.13672,1.52735.25879,1.52735.88868,0,.47168-.37989.82129-1.08692.82129a1.99775,1.99775,0,0,1-1.77832-.91993l-.77441.64649a2.86765,2.86765,0,0,0,2.48437,1.13965c1.27637,0,2.0293-.69141,2.0293-1.67188,0-1.13965-1.00391-1.375-1.92285-1.543-.84375-.14355-1.5127-.25-1.5127-.86621C191.75038,81.15527,192.1,80.791,192.82265,80.791Z" transform="translate(-16.61565 -17.12005)"/><polygon class="cls-1" points="181.557 66.977 181.352 67.622 181.146 66.977 180.091 64.195 179.133 64.195 180.851 68.45 181.815 68.45 183.578 64.195 182.651 64.195 181.557 66.977"/><path class="cls-1" d="M201.433,79.46875a.56047.56047,0,0,0-.59961.60742.55267.55267,0,0,0,.59961.59278.56032.56032,0,0,0,.60059-.59278A.56818.56818,0,0,0,201.433,79.46875Z" transform="translate(-16.61565 -17.12005)"/><rect class="cls-1" x="184.33102" y="64.19538" width="0.92773" height="4.25488"/><polygon class="cls-1" points="189.901 64.963 189.901 64.195 186.315 64.195 186.315 64.993 188.952 64.993 186.269 67.676 186.269 68.45 189.939 68.45 189.939 67.652 187.212 67.652 189.901 64.963"/><path class="cls-1" d="M208.47792,82.34082V81.31543H207.559v4.25488h.91894v-2.1582c0-.89649.40332-1.33691.93457-1.33691a1.29544,1.29544,0,0,1,.72168.18945l.25879-.84277a1.47105,1.47105,0,0,0-.7373-.167C209.03261,81.25488,208.66835,81.59668,208.47792,82.34082Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M215.08144,84.9248c-.28809,0-.42481-.1289-.42481-.5625V82.751c0-.99512-.65429-1.51953-1.71777-1.51953a2.0818,2.0818,0,0,0-2.05176,1.33007l.82813.26563a1.15972,1.15972,0,0,1,1.18554-.86621c.63868,0,.874.27344.874.59277s-.25879.44824-1.01856.6084a4.3856,4.3856,0,0,0-1.42773.44824,1.05276,1.05276,0,0,0-.54.97266c0,.65332.47851,1.06347,1.33789,1.06347a1.71279,1.71279,0,0,0,1.65625-1.10156c0,.77442.28125,1.09375.96484,1.09375a1.31974,1.31974,0,0,0,.63867-.15918v-.61523A.77769.77769,0,0,1,215.08144,84.9248Zm-1.27637-1.35253a1.37745,1.37745,0,0,1-1.33008,1.38281c-.501,0-.75976-.19043-.75976-.52442,0-.44043.36523-.59277,1.125-.75976.5625-.12207.83593-.22754.96484-.40235Z" transform="translate(-16.61565 -17.12005)"/><path class="cls-1" d="M172.287,66.50687a1.57468,1.57468,0,0,0,1.50489-.97266v.91992h.91894V60.4053h-.91894v2.64453a1.42715,1.42715,0,0,0-1.42871-.90429,1.9723,1.9723,0,0,0-1.915,2.20312C170.44814,65.78519,171.27626,66.50687,172.287,66.50687Zm.335-3.624c.86622,0,1.23829.60742,1.23829,1.43555,0,.82129-.3877,1.42871-1.2461,1.42871-.81347,0-1.22363-.53223-1.22363-1.41309C171.39052,63.46,171.82411,62.88284,172.622,62.88284Z" transform="translate(-16.61565 -17.12005)"/></svg> \ No newline at end of file
diff --git a/templates/registration/base_client.html b/templates/registration/base_client.html
index 3e78397..d90462c 100644
--- a/templates/registration/base_client.html
+++ b/templates/registration/base_client.html
@@ -90,28 +90,22 @@
{% block breadcrumb %}
{% endblock %}
<ul class="right">
- {% if user.is_authenticated %}
- {% if group_view %}
- <li class="hide-on-small-only"><a class="modal-trigger" href="#modal_capi">Lista documenti</a></li>
- {% endif %}
- {% if user.is_staff or perms.client.staff %}
- <li class="hide-on-small-only"><a href="{% url 'server' %}">Pannello Admin</a></li>
- {% endif %}
- <li class="hide-on-small-only tooltipped" data-position="bottom" data-tooltip="Dati personali"><a href="{% url 'personal' %}">{{ user.username }}</a></li>
- <li class="hide-on-med-and-up tooltipped" data-position="bottom" data-tooltip="Dati personali"><a href="{% url 'personal' %}"><i class="material-icons">person</i></a></li>
- {% if user.is_staff or perms.client.staff %}
- <li class="tooltipped hide-on-med-and-up" data-position="bottom" data-tooltip="Pannello Admin" class="hide-on-med-and-up"><a href="{% url 'server' %}"><i class="material-icons">build</i></a></li>
- {% endif %}
- {% if group_view %}
- <li class="tooltipped hide-on-med-and-up" data-position="bottom" data-tooltip="Lista documenti" class="hide-on-med-and-up"><a class="modal-trigger" href="#modal_capi"><i class="material-icons">list</i></a></li>
- {% endif %}
- <li class="tooltipped" data-position="bottom" data-tooltip="Informazioni"><a href="{% url 'about' %}"><i class="material-icons">info_outline</i></a></li>
- <li class="tooltipped" data-position="bottom" data-tooltip="Logout"><a href="{% url 'logout' %}"><i class="material-icons">exit_to_app</i></a></li>
- {% else %}
- <li><a href="{% url 'about' %}"><i class="material-icons">info_outline</i></a></li>
- <li><a href="{% url 'signup' %}">Registrazione</a></li>
- <li><a href="{% url 'login' %}">Login</a></li>
+ {% if group_view %}
+ <li class="hide-on-small-only"><a class="modal-trigger" href="#modal_capi">Lista documenti</a></li>
{% endif %}
+ {% if user.is_staff or perms.client.staff %}
+ <li class="hide-on-small-only"><a href="{% url 'server' %}">Pannello Admin</a></li>
+ {% endif %}
+ <li class="hide-on-small-only tooltipped" data-position="bottom" data-tooltip="Dati personali"><a href="{% url 'personal' %}">{{ user.username }}</a></li>
+ <li class="hide-on-med-and-up tooltipped" data-position="bottom" data-tooltip="Dati personali"><a href="{% url 'personal' %}"><i class="material-icons">person</i></a></li>
+ {% if user.is_staff or perms.client.staff %}
+ <li class="tooltipped hide-on-med-and-up" data-position="bottom" data-tooltip="Pannello Admin" class="hide-on-med-and-up"><a href="{% url 'server' %}"><i class="material-icons">build</i></a></li>
+ {% endif %}
+ {% if group_view %}
+ <li class="tooltipped hide-on-med-and-up" data-position="bottom" data-tooltip="Lista documenti" class="hide-on-med-and-up"><a class="modal-trigger" href="#modal_capi"><i class="material-icons">list</i></a></li>
+ {% endif %}
+ <li class="tooltipped" data-position="bottom" data-tooltip="Informazioni"><a href="{% url 'about' %}"><i class="material-icons">info_outline</i></a></li>
+ <li class="tooltipped" data-position="bottom" data-tooltip="Logout"><a href="{% url 'logout' %}"><i class="material-icons">exit_to_app</i></a></li>
</ul>
</div>
{% block toolbar %}
diff --git a/templates/registration/login.html b/templates/registration/login.html
index 5a24448..8a2b258 100644
--- a/templates/registration/login.html
+++ b/templates/registration/login.html
@@ -1,4 +1,5 @@
{% extends 'registration/base_simple.html' %}
+{% load static %}
{% block title %}Login{% endblock %}
@@ -14,8 +15,29 @@
<a href={% url 'password_reset' %}>Password dimenticata</a>
<br>
<br>
- <a href={% url 'oauth_login' %} class="btn waves-effect waves-light {{color}}">OAuth</a>
<button class="btn waves-effect waves-light {{color}}" type="submit">Login</button>
+ <br><br><hr><br>
+ <div class="row">
+ <div class="col s12">
+ <a href={% url 'oauth_login' %} style="width: 100%; background-color: #99BF62" class="btn waves-effect waves-light">
+ <div class="row">
+ <div class="col s2">
+ <img style="height: 30px; padding-top: 3px" src="{% static 'pbs_logo.svg' %}" alt="PBS Logo">
+ </div>
+ <div class="col s10">
+ Login con MiData
+ </div>
+ </div>
+ </a>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <a href={% url 'signup' %} style="width: 100%" class="btn waves-effect waves-light {{color}}">
+ Registrazione
+ </a>
+ </div>
+ </div>
</form>
</div>
</div>
diff --git a/version.txt b/version.txt
index 76e6671..0e21dbb 100644
--- a/version.txt
+++ b/version.txt
@@ -1,2 +1,2 @@
version=0.4
-rev=7
+rev=8