1
|
{% load widget_tweaks %}
|
2
|
|
3
|
{% if form.errors %}
|
4
|
<pre style="display: none">
|
5
|
errors:
|
6
|
{% for field in form %}
|
7
|
{% if field.errors %}- {{field.name}} {{ field.errors|striptags }}{% endif %}
|
8
|
{% endfor %}
|
9
|
</pre>
|
10
|
{% endif %}
|
11
|
|
12
|
<form action="{{ request.get_full_path }}" method="post">
|
13
|
{% csrf_token %}
|
14
|
|
15
|
Modèle : {{ form.template_filename }}
|
16
|
|
17
|
<h3>Patient</h3>
|
18
|
|
19
|
<ul>
|
20
|
<li>{{ object.first_name }} <span class="lastname">{{ object.last_name }}</span></li>
|
21
|
{% if object.birthdate %}
|
22
|
<li>Date de naissance : {{ object.birthdate|date:"d/m/Y" }}</li>
|
23
|
{% endif %}
|
24
|
</ul>
|
25
|
|
26
|
<h3>Adresse</h3>
|
27
|
|
28
|
{% if object.addresses_contacts_comment %}<p>Commentaire : <strong>{{ object.addresses_contacts_comment }}</strong></p>{% endif %}
|
29
|
|
30
|
<ul class="addresses">
|
31
|
{% for address in object.addresses.all %}
|
32
|
<li>
|
33
|
<span>{{ address.display_name }} {% if address.phone %}(Tél : {{ address.phone }}){% endif %}</span>
|
34
|
{% if address.comment %}<p><em>Commentaire : {{ address.comment }}</em></p>{% endif %}
|
35
|
<ul>
|
36
|
{% if address.recipient %}
|
37
|
<li><input type="radio" name="contact" id="contact_{{ address.id }}_{{ contact.id }}"
|
38
|
{% if address.recipient %}data-address-recipient="{{ address.recipient }}"{% endif %}
|
39
|
{% if address.street %}data-address-street="{{ address.street }}"{% endif %}
|
40
|
{% if address.number %}data-address-number="{{ address.number }}"{% endif %}
|
41
|
{% if address.address_complement %}data-address-address-complement="{{ address.address_complement }}"{% endif %}
|
42
|
{% if address.zip_code %}data-address-zip-code="{{ address.zip_code }}"{% endif %}
|
43
|
{% if address.city %}data-address-city="{{ address.city }}"{% endif %}
|
44
|
{% if address.phone %}data-address-phone="{{ address.phone }}"{% endif %}
|
45
|
{% if contact.gender %}data-contact-gender={% if contact.gender == 1 %}"Monsieur"{% elif contact.gender == 2 %}"Madame"{% endif %}{% endif %}
|
46
|
{% if contact.first_name %}data-contact-first-name="{{ contact.first_name }}"{% endif %}
|
47
|
{% if contact.last_name %}data-contact-last-name="{{ contact.last_name }}"{% endif %}
|
48
|
><label for="contact_{{ address.id }}_{{ contact.id }}">{{ address.recipient }} (DESTINATAIRE)</label></input></li>
|
49
|
{% endif %}
|
50
|
{% for contact in address.patientcontact_set.all %}
|
51
|
<li><input type="radio" name="contact" id="contact_{{ address.id }}_{{ contact.id }}"
|
52
|
{% if address.street %}data-address-street="{{ address.street }}"{% endif %}
|
53
|
{% if address.number %}data-address-number="{{ address.number }}"{% endif %}
|
54
|
{% if address.address_complement %}data-address-address-complement="{{ address.address_complement }}"{% endif %}
|
55
|
{% if address.zip_code %}data-address-zip-code="{{ address.zip_code }}"{% endif %}
|
56
|
{% if address.city %}data-address-city="{{ address.city }}"{% endif %}
|
57
|
{% if address.phone %}data-address-phone="{{ address.phone }}"{% endif %}
|
58
|
{% if contact.gender %}data-contact-gender={% if contact.gender == 1 %}"Monsieur"{% elif contact.gender == 2 %}"Madame"{% endif %}{% endif %}
|
59
|
{% if contact.first_name %}data-contact-first-name="{{ contact.first_name }}"{% endif %}
|
60
|
{% if contact.last_name %}data-contact-last-name="{{ contact.last_name }}"{% endif %}
|
61
|
><label for="contact_{{ address.id }}_{{ contact.id }}">{% if contact.gender == 1 %}M. {% elif contact.gender == 2 %}Mme {% endif %}{% if contact.first_name %}{{ contact.first_name }} {% endif %}<span class="lastname">{{ contact.last_name }}</span>{% if contact.mobile %} (Perso : {{ contact.mobile }}){% endif %}{% if contact.phone %} (Pro : {{ contact.phone }}){% endif %}{% if contact.id == object.id %} (PATIENT){% endif %}{% if object.policyholder.id == contact.id %} (ASSURE){% endif %}</label></input></li>
|
62
|
{% endfor %}
|
63
|
</ul>
|
64
|
</li>
|
65
|
{% endfor %}
|
66
|
</ul>
|
67
|
|
68
|
{{ form.address }}
|
69
|
|
70
|
<p><label>Téléphone : </label><input id="id_phone_address" type="text" name="phone_address" value=""/></p>
|
71
|
|
72
|
{% if appointment %}
|
73
|
<h3>Rendez-vous</h3>
|
74
|
|
75
|
<ul>
|
76
|
<li>Date : {{ appointment.date }}</li>
|
77
|
<li>Heure : {{ appointment.begin_hour }}</li>
|
78
|
{% if appointment.workers %}
|
79
|
<li>Intervenant(s) :
|
80
|
{% for worker in appointment.workers %}
|
81
|
{{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
|
82
|
{% endfor %}
|
83
|
</li>
|
84
|
{% endif %}
|
85
|
</ul>
|
86
|
|
87
|
{% endif %}
|
88
|
|
89
|
</form>
|