aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Gruin2018-01-17 19:13:33 +0100
committerAlban Gruin2018-01-17 21:32:59 +0100
commitdd1758f543d45376ea64d6846152fbf229b936f9 (patch)
treeae094b0d689a1440c763e264f9474cd7a991053f
parent8418b6b82e892a435b16f2be90ae94bb7961416b (diff)
Meilleur formatage du formulaire avec des tableaux
-rw-r--r--static/celcatsanitizer/style.css6
-rw-r--r--templates/form_qsjps.html12
2 files changed, 16 insertions, 2 deletions
diff --git a/static/celcatsanitizer/style.css b/static/celcatsanitizer/style.css
index 825d140..b9d5dd9 100644
--- a/static/celcatsanitizer/style.css
+++ b/static/celcatsanitizer/style.css
@@ -36,6 +36,12 @@ li.course {
margin-bottom: 20px;
}
+th {
+ text-align: right;
+ font-weight: normal;
+ vertical-align: top;
+}
+
@media print {
body, .content {
max-width: none;
diff --git a/templates/form_qsjps.html b/templates/form_qsjps.html
index 2d97a89..3a9bcf8 100644
--- a/templates/form_qsjps.html
+++ b/templates/form_qsjps.html
@@ -3,8 +3,16 @@
{% block title %}QSJPS – {% endblock %}
{% block body %}
+ <h3>Trouver une salle</h3>
<form action="{% url "qsjps" %}" method="post">
- {{ form }}
- <input type="submit" value="Trouver une salle" />
+ <table>
+ {% for field in form.visible_fields %}
+ <tr>
+ <th>{{ field.label_tag }}</th>
+ <td>{{ field }}{% if field.errors %}<br /><span>{{ field.errors|join:" " }}</span>{% endif %}</td>
+ </tr>
+ {% endfor %}
+ <tr><th></th><td><input type="submit" value="Trouver une salle" /></td></tr>
+ </table>
</form>
{% endblock %}