Project

General

Profile

« Previous | Next » 

Revision 4d283c00

Added by Frédéric Péters about 13 years ago

agenda: mark required fields with asterisks (#1993)

View differences:

calebasse/agenda/templates/agenda/appointment.html
{% load widget_tweaks %}
<table id="new-appointment-table">
<tr>
<td>
<td {% if form.date.field.required %}class="required"{% endif %}>
<p class="datepicker">
{{ form.date.label_tag }}
{{ form.date|add_class:"datepicker-date" }}
{{ form.date.errors }}
</p>
</td>
<td>
<td {% if form.time.field.required %}class="required"{% endif %}>
<p>
{{ form.time.label_tag }}
{{ form.time }}
{{ form.time.errors }}
</p>
</td>
<td>
<td {% if form.duration.field.required %}class="required"{% endif %}>
<p>
{{ form.duration.label_tag }}
{{ form.duration|add_class:"mousewheel"|attr:"data-mousewheel-increment:5" }}
......
</td>
</tr>
<tr>
<td>
<td {% if form.duration.field.required %}class="required"{% endif %}>
<p>
{{ form.room.label_tag }}
{{ form.room }}
......
</td>
</tr>
<tr>
<td>
<td {% if form.participants.field.required %}class="required"{% endif %}>
<h4>{{ form.participants.label_tag }}</h4>
<div id="intervenants">
{{ form.participants }}
{{ form.participants.errors }}
</div>
</td>
<td>
<td {% if form.patient.field.required %}class="required"{% endif %}>
<h4>{{ form.patient.label_tag }}</h4>
{{ form.patient }}
{{ form.patient.errors }}
</td>
<td>
<td {% if form.act_type.field.required %}class="required"{% endif %}>
<h4>{{ form.act_type.label_tag }}</h4>
{{ form.act_type }}
{{ form.act_type.errors }}
calebasse/agenda/templates/agenda/event.html
{% load widget_tweaks %}
<table>
<tr>
<td>
<td {% if form.event_type.field.required %}class="required"{% endif %}>
<p>
{{ form.event_type.label_tag }}
{{ form.event_type }}
{{ form.event_type.errors }}
</p>
</td>
<td>
<td {% if form.title.field.required %}class="required"{% endif %}>
<p>
{{ form.title.label_tag }}
{{ form.title }}
{{ form.title.errors }}
</p>
</td>
<td>
<td {% if form.room.field.required %}class="required"{% endif %}>
<p>
{{ form.room.label_tag }}
{{ form.room }}
......
</tr>
<tr>
<td>
<td {% if form.date.field.required %}class="required"{% endif %}>
<p>
{{ form.date.label_tag }}
{{ form.date|add_class:"datepicker-date" }}
{{ form.date.errors }}
</p>
</td>
<td>
<td {% if form.time.field.required %}class="required"{% endif %}>
<p>
{{ form.time.label_tag }}
{{ form.time }}
{{ form.time.errors }}
</p>
</td>
<td>
<td {% if form.duration.field.required %}class="required"{% endif %}>
<p>
{{ form.duration.label_tag }}
{{ form.duration|add_class:"mousewheel"|attr:"data-mousewheel-increment:5" }}
......
</tr>
<tr>
<td>
<td {% if form.participants.field.required %}class="required"{% endif %}>
{{ form.participants.label_tag }}
<div id="intervenants">
{{ form.participants }}
{{ form.participants.errors }}
</div>
</td>
<td>
<td {% if form.services.field.required %}class="required"{% endif %}>
<div id="services">
{{ form.services.label_tag }}
{{ form.services }}
calebasse/static/css/style.css
width: 100%;
}
td.required label:after,
label.required:after {
content: '*';
content: ' *';
color: red;
}

Also available in: Unified diff