Revision a2e49cca
Added by Mikaël Ates about 10 years ago
calebasse/agenda/templates/agenda/appointment.html | ||
---|---|---|
3 | 3 |
{{ form.non_field_errors }} |
4 | 4 |
{{ form.start_datetime }} |
5 | 5 |
{{ form.start_datetime.errors }} |
6 |
{% if object.is_recurring and object.one_act_is_billed %}<p><em>Le rendez-vous périodique a un acte qui est facturé ce qui empêche de le modifier à l'exception de la description, de la ressource et des dates de début et de fin.</em></p>{% endif %}
|
|
7 |
{% if object.is_recurring and object.one_act_already_billed %}<p><em>Le rendez-vous périodique a un acte qui a déjà été facturé ce qui empêche de le supprimer.</em></p>{% endif %}
|
|
6 |
{% if object.is_recurring and object.one_act_not_new %}<p><em>Le rendez-vous périodique a un acte qui est pointé ce qui empêche de le modifier à l'exception de la description, de la ressource et de la date de fin.</em></p>{% endif %}
|
|
7 |
{% if object.is_recurring and object.one_act_not_new %}<p><em>Le rendez-vous périodique a un acte qui est pointé ce qui empêche de le supprimer.</em></p>{% endif %}
|
|
8 | 8 |
<table id="new-appointment-table"> |
9 | 9 |
<tr> |
10 | 10 |
<td {% if form.time.field.required %}class="required"{% endif %}> |
11 | 11 |
<p> |
12 | 12 |
{{ form.time.label_tag }} |
13 |
{% if object.is_recurring and object.one_act_is_billed %}
|
|
13 |
{% if object.is_recurring and object.one_act_not_new %}
|
|
14 | 14 |
{{ object.time }} |
15 | 15 |
{{ form.time.as_hidden }} |
16 | 16 |
{% else %} |
... | ... | |
22 | 22 |
<td {% if form.duration.field.required %}class="required"{% endif %}> |
23 | 23 |
<p> |
24 | 24 |
{{ form.duration.label_tag }} |
25 |
{% if object.is_recurring and object.one_act_is_billed %}
|
|
25 |
{% if object.is_recurring and object.one_act_not_new %}
|
|
26 | 26 |
{{ object.duration }} |
27 | 27 |
{{ form.duration.as_hidden }} |
28 | 28 |
{% else %} |
... | ... | |
34 | 34 |
<td {% if form.date.field.required %}class="required"{% endif %}> |
35 | 35 |
<p class="datepicker"> |
36 | 36 |
{{ form.date.label_tag }} |
37 |
{% if object.is_recurring and object.one_act_not_new %} |
|
38 |
{{ object.date }} |
|
39 |
{{ form.date.as_hidden }} |
|
40 |
{% else %} |
|
37 | 41 |
{{ form.date|add_class:"datepicker-date" }} |
42 |
{% endif %} |
|
38 | 43 |
{{ form.date.errors }} |
39 | 44 |
</p> |
40 | 45 |
</td> |
... | ... | |
52 | 57 |
<td {% if form.participants.field.required %}class="required"{% endif %}> |
53 | 58 |
<h4>{{ form.participants.label_tag }}</h4> |
54 | 59 |
<div id="intervenants"> |
55 |
{% if object.is_recurring and object.one_act_is_billed %}
|
|
60 |
{% if object.is_recurring and object.one_act_not_new %}
|
|
56 | 61 |
<ul>{% for p in object.participants.all %}<li>{{ p }}</li>{% endfor %}</ul> |
57 | 62 |
<input id="id_participants" name="participants" value="|{% for p in object.participants.all %}{{ p.id }}|{% endfor %}" type="hidden"/> |
58 | 63 |
{% else %} |
... | ... | |
75 | 80 |
</td> |
76 | 81 |
<td {% if form.act_type.field.required %}class="required"{% endif %}> |
77 | 82 |
<h4>{{ form.act_type.label_tag }}</h4> |
78 |
{% if object.is_recurring and object.one_act_is_billed %}
|
|
83 |
{% if object.is_recurring and object.one_act_not_new %}
|
|
79 | 84 |
{{ object.act_type }} |
80 | 85 |
{{ form.act_type.as_hidden }} |
81 | 86 |
{% else %} |
... | ... | |
108 | 113 |
{{ object.exception_to.recurrence_description|lower }}</p> |
109 | 114 |
|
110 | 115 |
{% if not object.exception_to.canceled %} |
111 |
<p><button type="button" data-delete-url="{% url 'delete-event' service=service date=date pk=object.exception_to.pk %}" data-id="{{ object.exception_to.id }}" data-one_act_already_billed="{{ object.exception_to.one_act_already_billed }}" class="update-periodic-rdv">Éditer le rendez-vous périodique</button></p>
|
|
116 |
<p><button type="button" data-delete-url="{% url 'delete-event' service=service date=date pk=object.exception_to.pk %}" data-id="{{ object.exception_to.id }}" data-one_act_not_new="{{ object.exception_to.one_act_not_new }}" class="update-periodic-rdv">Éditer le rendez-vous périodique</button></p>
|
|
112 | 117 |
{% endif %} |
113 | 118 |
|
114 | 119 |
{% endif %} |
Also available in: Unified diff
agenda: prevent periodic modification and deletion if one act is not new.