Project

General

Profile

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

calebasse / calebasse / dossiers / templates / dossiers / patientrecord_tab3_adresses.html @ b773431d

1
{% load dossiers %}
2
<div id="tabs-3">
3
  <form method="post" action="tab3" id="policyholder-form" class="patientrecordform">{% csrf_token %}
4
    <p>
5
    {% if nb_place_of_lifes == 1 %}
6
    <span>Un lieu de vie unique est indiqué</span>
7
    {% elif nb_place_of_lifes > 1 %}
8
    <span class="highlight">Il y a {{ nb_place_of_lifes }} lieux de vie d'indiqués</span>
9
    {% else %}
10
    <span class="highlight">Aucun lieu de vie d'indiqué</span>
11
    {% endif %}
12
    </p>
13
    <p>
14
    <label>Commentaire <button class="save enable-on-change btn-maj"></button></label>
15
    {{ forms.policyholder.contact_comment }}
16
    </p>
17
    <p>
18
    <button type="button" id="new-address-btn" class="icon-home-space">Nouvelle adresse</button>
19
    <button type="button" id="new-contact-btn" class="icon-user-space">Nouveau contact</button>
20
    </p>
21

    
22
    <div class="contact patient">
23
      <h4 class="icon-user-space">Patient</h4>
24
      <div class="right">Assuré
25
        <input type="radio"
26
        {% if object.policyholder.id == object.id %} checked="checked" {% endif %}
27
        id="id_policyholder-policyholder_{{ object.id }}"
28
        value="{{ object.id }}"
29
        class="policyholder-radio"
30
        name="policyholder-policyholder">
31
        <button type="button" data-id="{{ object.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
32
      </div>
33
      <div>
34
        {% include "dossiers/patientrecord_tab3_contact.html" with contact=object %}
35
      </div>
36
    </div>
37

    
38
    {% for contact in object.contacts.all %}
39
    {% if not contact.addresses.all %}
40
    <div class="contact">
41
      <h4>{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
42
        {{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
43
      <div class="right">Assuré
44
        <input type="radio"
45
        {% if object.policyholder.id == contact.id %} checked="checked" {% endif %}
46
        id="id_policyholder-policyholder_{{ contact.id }}"
47
        value="{{ contact.id }}"
48
        class="policyholder-radio"
49
        name="policyholder-policyholder">
50
        <button type="button" data-id="{{ contact.id }}" data-address-id="{{ address.id }}" class="del-contact icon-minus" title="Supprimer"></button>
51
        <button type="button" data-id="{{ contact.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
52
      </div>
53
      <div>
54
        {% include "dossiers/patientrecord_tab3_contact.html" %}
55
      </div>
56
    </div>
57
    {% endif %}
58
    {% endfor %}
59
    {% for address in addresses %}
60
    <div class="frame {% if address.place_of_life %}orange{% endif %}">
61
      <h3 class="icon-home-space">{{ address }}</h3>
62
      <div class="buttons">
63
        <button type="button" data-id="{{ address.id }}" class="del-address icon-minus" title="Supprimer"></button>
64
        <button type="button" data-id="{{ address.id }}" class="update-address-btn icon-edit" title="Modifier"></button>
65
      </div>
66
      <div class="right">
67
        <ul class="ajax_messages" style="display: none;"></ul>
68
        <input type="checkbox" data-id="{{ address.id }}" class="place_of_life" {% if address.place_of_life %}checked{% endif %}>Lieu de vie</input>
69
      </div>
70
      {% if address.phone %}<p><span class="icon-phone">{{ address.phone|phone }}</span></p>{% endif %}
71
      {% if address.comment %}<p><label>Commentaire :</label>{{ address.comment }}</p>{% endif %}
72
      {% if not address.phone and not address.comment %}<p>&nbsp;<!-- intentionaly empty --></p>{% endif %}
73
      {% for contact in address.patientcontact_set.all  %}
74
      {% if contact.id != object.id %}
75
      <div class="contact">
76
        <h4 class="icon-user-space">{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
77
          {{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
78
        <div class="right">Assuré
79
          <input type="radio"
80
          {% if object.policyholder.id == contact.id %} checked="checked" {% endif %}
81
          id="id_policyholder-policyholder_{{ contact.id }}"
82
          value="{{ contact.id }}"
83
          class="policyholder-radio"
84
          name="policyholder-policyholder">
85
          <button type="button" data-id="{{ contact.id }}" data-address-id="{{ address.id }}" class="del-contact icon-minus" title="Supprimer"></button>
86
          <button type="button" data-id="{{ contact.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
87
        </div>
88
        <div>
89
          {% include "dossiers/patientrecord_tab3_contact.html" %}
90
        </div>
91
      </ul>
92
    </span>
93
  </div>
94
  {% endif %}
95
  {% endfor %}
96
</div>
97
{% endfor %}
98
  </form>
99
</div>
(16-16/29)