Project

General

Profile

Download (4.58 KB) Statistics
| Branch: | Tag: | Revision:
<div id="tabs-3">
<form method="post" action="tab3" id="policyholder-form" class="patientrecordform">{% csrf_token %}

<div class="contact patient">
{% if nb_place_of_lifes == 1 %}
<p>Un lieu de vie unique est indiqué</p>
{% elif nb_place_of_lifes > 1 %}
<p class="highlight">Il y a {{ nb_place_of_lifes }} lieux de vie d'indiqués</p>
{% else %}
<p class="highlight">Aucun lieu de vie d'indiqué</p>
{% endif %}
<div class="right">Assuré
<input type="radio"
{% if object.policyholder.id == object.id %} checked="checked" {% endif %}
id="id_policyholder-policyholder_{{ object.id }}"
value="{{ object.id }}"
class="policyholder-radio"
name="policyholder-policyholder">
<button type="button" data-id="{{ object.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
</div>
<div>
{% include "dossiers/patientrecord_tab3_contact.html" with contact=object %}
<hr>
<span>
<label>Commentaire </label> <button class="save enable-on-change btn-maj"></button><br/>
{{ forms.policyholder.contact_comment }}
</span>
</div>
</div>

<button type="button" id="new-address-btn" class="icon-home-space">Nouvelle adresse</button>
<button type="button" id="new-contact-btn" class="icon-user-space">Nouveau contact</button>

{% for contact in object.contacts.all %}
{% if not contact.addresses.all %}
<div class="contact">
<h4>{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
{{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
<div class="right">Assuré
<input type="radio"
{% if object.policyholder.id == contact.id %} checked="checked" {% endif %}
id="id_policyholder-policyholder_{{ contact.id }}"
value="{{ contact.id }}"
class="policyholder-radio"
name="policyholder-policyholder">
<button type="button" data-id="{{ contact.id }}" data-address-id="{{ address.id }}" class="del-contact icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ contact.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
</div>
<div>
{% include "dossiers/patientrecord_tab3_contact.html" %}
</div>
</div>
{% endif %}
{% endfor %}
{% for address in addresses %}
<div class="frame {% if address.place_of_life %}orange{% endif %}">
<h3 class="icon-home-space">{{ address }}</h3>
<div class="buttons">
<button type="button" data-id="{{ address.id }}" class="del-address icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ address.id }}" class="update-address-btn icon-edit" title="Modifier"></button>
</div>
<div class="right">
<ul class="ajax_messages" style="display: none;"></ul>
<input type="checkbox" data-id="{{ address.id }}" class="place_of_life" {% if address.place_of_life %}checked{% endif %}>Lieu de vie</input>
</div>
{% if address.phone %}<p><span class="icon-home-space">{{ address.phone }}</span></p>{% endif %}
{% if address.comment %}<p><label>Commentaire :</label>{{ address.comment }}</p>{% endif %}
{% if not address.phone and not address.comment %}<p>&nbsp;<!-- intentionaly empty --></p>{% endif %}
{% for contact in address.patientcontact_set.all %}
{% if contact.id != object.id %}
<div class="contact">
<h4 class="icon-user-space">{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
{{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
<div class="right">Assuré
<input type="radio"
{% if object.policyholder.id == contact.id %} checked="checked" {% endif %}
id="id_policyholder-policyholder_{{ contact.id }}"
value="{{ contact.id }}"
class="policyholder-radio"
name="policyholder-policyholder">
<button type="button" data-id="{{ contact.id }}" data-address-id="{{ address.id }}" class="del-contact icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ contact.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
</div>
<div>
{% include "dossiers/patientrecord_tab3_contact.html" %}
</div>
</ul>
</span>
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</form>
</div>
(16-16/29)