Projet

Général

Profil

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

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

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
    <p>
9
    {% if nb_place_of_lifes == 1 %}
10
    <span>Un lieu de vie unique est indiqué</span>
11
    {% elif nb_place_of_lifes > 1 %}
12
    <span class="highlight">Il y a {{ nb_place_of_lifes }} lieux de vie d'indiqués</span>
13
    {% else %}
14
    <span class="highlight">Aucun lieu de vie n'est indiqué.</span>
15
    {% endif %}
16
    </p>
17
    <form method="post" action="tab3" class="autosubmit-form patientrecordform">{% csrf_token %}
18
    <p>
19
    <label>Commentaire <button class="save enable-on-change btn-maj"></button></label>
20
    {{ forms.comment.addresses_contacts_comment }}
21
    </p>
22
    </form>
23
    <p>
24
    <button type="button" id="new-address-btn" class="icon-home-space">Nouvelle adresse</button>
25
    <button type="button" id="new-contact-btn" class="icon-user-space">Nouveau contact</button>
26
    </p>
27

    
28
  <form method="post" action="tab3" class="autosubmit-form patientrecordform">{% csrf_token %}
29

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

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