width: 100%;
}
+TABLE.pgGenericFormTable TR TD SELECT {
+ width: 100%;
+}
+
TABLE.pgGenericFormTable TR TD TEXTAREA {
width: 100%;
}
width: 100%;
}
+TABLE.pgGenericFormTable TR.error {
+ background-color: red;
+ color: white;
+}
+
+TABLE.pgGenericFormTable TR.errorinfo {
+ background-color: #FFFFCC;
+}
+
+TABLE.pgGenericFormTable TR.errorheader TD {
+ background-color: #FFFFCC;
+ border: 1px solid red;
+ padding: 2px 2px 2px 2px;
+}
+
/* Misc Classes */
.pgClearBoth {
{%endif%}
<table class="pgGenericFormTable">
-{{form.as_table}}
+{%if form.errors%}
+ <tr class="errorheader">
+ <td colspan="2">Please correct the errors below, and re-submit the form.</td>
+ </tr>
+{%endif%}
+{%for field in form%}
+ {%if field.errors %}
+ <tr class="error">
+ <td colspan="2">{{field.errors.as_ul}}</td>
+ </tr>
+ {%endif%}
+ <tr {%if field.errors%}class="errorinfo"{%endif%}>
+ <th>{{field.label_tag}}</th>
+ <td>{{field}}</td>
+ </tr>
+{%endfor%}
</table>
<input type="submit" value="{{savebutton|default:"Save"}}">
</form>