Projet

Général

Profil

Télécharger (4,33 ko) Statistiques
| Branche: | Tag: | Révision:

calebasse / calebasse / dossiers / templates / dossiers / generate_rtf_form.html @ bfe4ddfb

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
<p><strong>Commentaire :</strong> <br />
28
{{ object.policyholder.contact_comment }}
29
</p>
30

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

    
69
{{ form.address }}
70

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

    
73
{% if appointment %}
74
<h3>Rendez-vous</h3>
75

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

    
88
{% endif %}
89

    
90
</form>
(2-2/33)