Project

General

Profile

Download (4.25 KB) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / dossiers / templates / dossiers / generate_rtf_form.html @ 78bae9a3

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
<ul class="addresses">
29
  {% for address in object.addresses.all %}
30
  <li>
31
  <span>{{ address.display_name }} {% if address.phone %}(Tél : {{ address.phone }}){% endif %}</span>
32
  <pre>{{ address.comment }}</pre>
33
  <ul>
34
    {% if address.recipient %}
35
    <li><input type="radio" name="contact" id="contact_{{ address.id }}_{{ contact.id }}"
36
               {% if address.recipient %}data-address-recipient="{{ address.recipient }}"{% endif %}
37
               {% if address.street %}data-address-street="{{ address.street }}"{% endif %}
38
               {% if address.number %}data-address-number="{{ address.number }}"{% endif %}
39
               {% if address.address_complement %}data-address-address-complement="{{ address.address_complement }}"{% endif %}
40
               {% if address.zip_code %}data-address-zip-code="{{ address.zip_code }}"{% endif %}
41
               {% if address.city %}data-address-city="{{ address.city }}"{% endif %}
42
               {% if address.phone %}data-address-phone="{{ address.phone }}"{% endif %}
43
               {% if contact.gender %}data-contact-gender={% if contact.gender == 1 %}"Monsieur"{% elif contact.gender == 2 %}"Madame"{% endif %}{% endif %}
44
               {% if contact.first_name %}data-contact-first-name="{{ contact.first_name }}"{% endif %}
45
               {% if contact.last_name %}data-contact-last-name="{{ contact.last_name }}"{% endif %}
46
               ><label for="contact_{{ address.id }}_{{ contact.id }}">{{ address.recipient }} (DESTINATAIRE)</label></input></li>
47
    {% endif %}
48
    {% for contact in address.patientcontact_set.all  %}
49
    <li><input type="radio" name="contact" id="contact_{{ address.id }}_{{ contact.id }}"
50
               {% if address.street %}data-address-street="{{ address.street }}"{% endif %}
51
               {% if address.number %}data-address-number="{{ address.number }}"{% endif %}
52
               {% if address.address_complement %}data-address-address-complement="{{ address.address_complement }}"{% endif %}
53
               {% if address.zip_code %}data-address-zip-code="{{ address.zip_code }}"{% endif %}
54
               {% if address.city %}data-address-city="{{ address.city }}"{% endif %}
55
               {% if address.phone %}data-address-phone="{{ address.phone }}"{% endif %}
56
               {% if contact.gender %}data-contact-gender={% if contact.gender == 1 %}"Monsieur"{% elif contact.gender == 2 %}"Madame"{% endif %}{% endif %}
57
               {% if contact.first_name %}data-contact-first-name="{{ contact.first_name }}"{% endif %}
58
               {% if contact.last_name %}data-contact-last-name="{{ contact.last_name }}"{% endif %}
59
       ><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>
60
    {% endfor %}
61
  </ul>
62
  </li>
63
  {% endfor %}
64
</ul>
65

    
66
{{ form.address }}
67

    
68
<p><label>Téléphone : </label><input id="id_phone_address" type="text" name="phone_address" value=""/></p>
69

    
70
{% if appointment %}
71
<h3>Rendez-vous</h3>
72

    
73
<ul>
74
 <li>Date : {{ appointment.date }}</li>
75
 <li>Heure : {{ appointment.begin_hour }}</li>
76
 {% if appointment.workers %}
77
 <li>Intervenant(s) :
78
      {% for worker in appointment.workers %}
79
        {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
80
      {% endfor %}
81
 </li>
82
 {% endif %}
83
</ul>
84

    
85
{% endif %}
86

    
87
</form>
(2-2/29)