Projet

Général

Profil

Télécharger (5 ko) Statistiques
| Branche: | Tag: | Révision:

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

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
    {% if cv2_reading %}<button type="button" id="read-cv2" class="icon-play">Lire la carte vitale</button>{% endif %}
27
    </p>
28

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

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

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