Hides hidden fields. Adds highlight class. Allows HTML tags in alert messages and form detail text.

This commit is contained in:
Aaron Louie 2020-08-13 15:18:51 -04:00
parent 459c3d508d
commit 18f557549f
3 changed files with 12 additions and 3 deletions

View File

@ -218,6 +218,10 @@ select.multi {
margin-bottom: 40px;
padding: 2em;
&.hidden {
display: none;
}
&:nth-child(even) {
background-color: $color-gray-light-2;
}
@ -292,3 +296,8 @@ select.multi {
margin: 0;
}
}
.highlight {
font-weight: bolder;
font-style: italic;
}

View File

@ -13,13 +13,13 @@
</head>
<body>
<h2>{{ title }}</h2>
<p>{{ details }}</p>
<p>{{ details|safe }}</p>
<form action="{{ action }}" method="post">
{{ form.csrf_token() }}
{% for field in form if field.name != "csrf_token" %}
<div class="form-field">
<div class="form-field {{ field.widget.input_type }}">
<div class="form-field-label">{{ field.label() }}:</div>
<div class="form-field-input">{{ field }}</div>
<div class="form-field-help">{{ description_map[field.name] }}</div>

View File

@ -22,7 +22,7 @@
{% for category, message in messages %}
<div class="alert {{ category }}">
<span class="btn-close" onclick="hideElement(this.parentElement);">&times;</span>
{{ message }}
{{ message|safe }}
</div>
{% endfor %}
{% endif %}