Projet

Général

Profil

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

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

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

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

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