Projet

Général

Profil

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

calebasse / calebasse / dossiers / templates / dossiers / patientrecord_tab3_adresses.html @ 54318d2c

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

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

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