aboutsummaryrefslogtreecommitdiffstats
path: root/client/templates
diff options
context:
space:
mode:
authorAndrea Lepori <aleporia@gmail.com>2023-07-25 13:47:43 +0200
committerAndrea Lepori <aleporia@gmail.com>2023-07-25 13:47:44 +0200
commit05463489f459761e93b8921b5627626ee3adf420 (patch)
tree97349a3eaa45e260b82b26685966559f6413a0a0 /client/templates
parentchange branca and color to show (diff)
downloadscout-subs-05463489f459761e93b8921b5627626ee3adf420.tar.gz
scout-subs-05463489f459761e93b8921b5627626ee3adf420.zip
create docs from uc
Diffstat (limited to 'client/templates')
-rw-r--r--client/templates/client/approve_doc_pdf.html2
-rw-r--r--client/templates/client/doc_create.html8
-rw-r--r--client/templates/client/index.html8
3 files changed, 12 insertions, 6 deletions
diff --git a/client/templates/client/approve_doc_pdf.html b/client/templates/client/approve_doc_pdf.html
index d2ba29b..0a62886 100644
--- a/client/templates/client/approve_doc_pdf.html
+++ b/client/templates/client/approve_doc_pdf.html
@@ -16,7 +16,7 @@
</div>
<br><br>
<div class="row">
- <p class="center">{{doc.user.first_name}} {{doc.user.last_name}} ({{doc.user.username}})</p>
+ <p class="center">{{doc.usercode.first_name}} {{doc.usercode.last_name}}</p>
</div>
<div class="row">
<h2 class="center">{{doc.code}}</h2>
diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html
index c42fa05..a6efae8 100644
--- a/client/templates/client/doc_create.html
+++ b/client/templates/client/doc_create.html
@@ -13,11 +13,17 @@
<div class="col l8 offset-l2 s12">
<div class="card-panel">
<div class="row">
- <form id="form" action="{% url 'create'%}" method="post" class="col s12">
+ <form id="form" action="{% url 'create' code=uc.code %}" method="post" class="col s12">
{% csrf_token %}
<input type="hidden" name="action" id="action">
{% if not next %}
<div class="row">
+ <div class="col s12">
+ {{uc.first_name}} {{uc.last_name}}
+ <div style="font-size: 0.5em; line-height: normal;">{{uc.born_date}}</div>
+ </div>
+ </div>
+ <div class="row">
<div class="input-field col s12">
<select name="doctype">
<option value="" disabled selected>Scegli</option>
diff --git a/client/templates/client/index.html b/client/templates/client/index.html
index 8bb2d41..d0fcc9b 100644
--- a/client/templates/client/index.html
+++ b/client/templates/client/index.html
@@ -38,7 +38,7 @@
<p style="text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: {{data.2}};">{{data.0.first_name}} {{data.0.last_name}}<a href="{% url "edit_user" code=data.0.code %}" class="btn-flat"><i class="material-icons">edit</i></a></p>
<div style="font-size: 0.5em; line-height: normal;">{{data.0.born_date}}</div>
</span>
- <a id="add" class="btn-floating halfway-fab btn-large {{color}}" href="{% url 'create'%}"><i class="material-icons">add</i></a>
+ <a id="add" class="btn-floating halfway-fab btn-large {{color}}" href="{% url 'create' code=data.0.code %}"><i class="material-icons">add</i></a>
{% if data.1|length > 0 %}
<ul class="collapsible">
{% for doc in data.1 %}
@@ -150,11 +150,11 @@
<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" >
+ <input disabled value="{{doc.usercode.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" >
+ <input disabled value="{{doc.usercode.last_name}}" id="last_name" type="text" >
<label for="last_name">Cognome</label>
</div>
<div class="input-field col l4 s12">
@@ -162,7 +162,7 @@
<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">
+ <input disabled value="{{doc.usercode.branca.name}}" id="branca" type="text">
<label for="branca">Branca</label>
</div>
<div class="input-field col l4 s12">