mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-10 00:42:06 +00:00
Basic styling making form error messages look a little bit better.
This commit is contained in:
@ -644,6 +644,10 @@ TABLE.pgGenericFormTable TR TD INPUT {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
TABLE.pgGenericFormTable TR TD SELECT {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
TABLE.pgGenericFormTable TR TD TEXTAREA {
|
||||
width: 100%;
|
||||
}
|
||||
@ -652,6 +656,21 @@ TABLE.pgGenericFormTable TR TD DIV.markdownpreview {
|
||||
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 {
|
||||
|
@ -9,7 +9,22 @@
|
||||
{%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>
|
||||
|
Reference in New Issue
Block a user