Apply styles to form error.

See #904 #905
 - Legacy-Id: 5096
This commit is contained in:
Emilio Jiménez 2012-12-04 18:29:22 +00:00
parent bcdeaf3004
commit 9c527ccd45
4 changed files with 7 additions and 10 deletions

View file

@ -5,7 +5,7 @@
{% block content %}
<h1>Edit {{ state.group.acronym }} chair</h1>
{% if form.errors %}<h3>Please correct the following errors</h3>{% endif %}
{% if form.errors %}<div class="info-message-error">Please correct the following errors</div>{% endif %}
<form action="" method="post">{% csrf_token %}
<table>

View file

@ -5,7 +5,7 @@
{% block content %}
<h1>Edit {{ state.group.acronym }} members</h1>
{% if form.errors %}<h3>Please correct the following errors</h3>{% endif %}
{% if form.errors %}<div class="info-message-error">Please correct the following errors</div>{% endif %}
<form action="" method="post">{% csrf_token %}
<table>

View file

@ -2,13 +2,6 @@
{% block title %}Edit {{ group.acronym }} public key{% endblock %}
{% block morecss %}
div.info-message-success { border: 1px solid green; background-color: #eeffbb; padding: 5px 10px; margin: 1em 0px; color: green; }
div.info-message-warning { border: 1px dashed red; background-color: #ffeeaa; padding: 1em 2em; margin: 1em 0px; }
{% endblock morecss %}
{% block content %}
<h1>Edit {{ group.acronym }} public key</h1>
@ -16,7 +9,7 @@ div.info-message-warning { border: 1px dashed red; background-color: #ffeeaa; pa
<div class="info-message-{{ message.0 }}">{{ message.1 }}</div>
{% endif %}
{% if form.errors %}<h3>Please correct the following errors</h3>{% endif %}
{% if form.errors %}<div class="info-message-error">Please correct the following errors</div>{% endif %}
<form enctype="multipart/form-data" action="" method="post">{% csrf_token %}
<table>

View file

@ -194,3 +194,7 @@ form table .help {
.ballot-content h2.ad-ballot-comment { background: #2647A0; color: #fff; padding: 2px 4px; font-size: 108%; margin-top: 0;}
/* Message types */
div.info-message-success { border: 1px solid green; background-color: #eeffbb; padding: 5px 10px; margin: 1em 0px; color: green; }
div.info-message-warning { border: 1px dashed red; background-color: #ffeeaa; padding: 1em 2em; margin: 1em 0px; }
div.info-message-error { border: 1px solid red; background-color: #ffeebb; padding: 5px 10px; margin: 1em 0px; color: red; }