Project

General

Profile

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

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

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>{{ address.display_name }}{% if address.phone %}(Tél : {{ address.phone }}){% endif %}
31
  <ul>
32
    {% for contact in address.patientcontact_set.all  %}
33
    <li><input type="radio" name="contact" id="contact_{{ address.id }}_{{ contact.id }}"
34
               {% if address.street %}data-address-street="{{ address.street }}"{% endif %}
35
               {% if address.number %}data-address-number="{{ address.number }}"{% endif %}
36
               {% if address.address_complement %}data-address-address-complement="{{ address.address_complement }}"{% endif %}
37
               {% if address.zip_code %}data-address-zip-code="{{ address.zip_code }}"{% endif %}
38
               {% if address.city %}data-address-city="{{ address.city }}"{% endif %}
39
               {% if address.phone %}data-address-phone="{{ address.phone }}"{% endif %}
40
               {% if contact.gender %}data-contact-gender={% if contact.gender == 1 %}"Monsieur"{% elif contact.gender == 2 %}"Madame"{% endif %}{% endif %}
41
               {% if contact.first_name %}data-contact-first-name="{{ contact.first_name }}"{% endif %}
42
               {% if contact.last_name %}data-contact-last-name="{{ contact.last_name }}"{% endif %}
43
       ><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>
44
    {% endfor %}
45
  </ul>
46
  </li>
47
  {% endfor %}
48
</ul>
49

    
50
{{ form.address }}
51

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

    
54
{% if appointment %}
55
<h3>Rendez-vous</h3>
56

    
57
<ul>
58
 <li>Date : {{ appointment.date }}</li>
59
 <li>Heure : {{ appointment.begin_hour }}</li>
60
 {% if appointment.workers %}
61
 <li>Intervenant(s) :
62
      {% for worker in appointment.workers %}
63
        {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
64
      {% endfor %}
65
 </li>
66
 {% endif %}
67
</ul>
68

    
69
{% endif %}
70

    
71
</form>
(2-2/20)