Change form structure and add relevant CSS rules

This commit is contained in:
Jef van Schendel 2011-11-19 23:46:42 +01:00
parent 7880168526
commit aea6d577cb
2 changed files with 10 additions and 8 deletions

View File

@ -212,7 +212,11 @@ text-align: center;
width: 100%;
}
.form_field_label,.form_field_input {
.form_field_input {
margin-bottom: 10px;
}
.form_field_label {
margin-bottom: 4px;
}

View File

@ -18,18 +18,16 @@
{# Generically render a field #}
{% macro render_field_div(field) %}
<div class="form_field_box">
<div class="form_field_label">{{ _(field.label.text) }}</div>
<div class="form_field_input">{{ field }}</div>
<p class="form_field_label"><label for="{{ field.name }}">{{ _(field.label.text) }}</label></p>
<div class="form_field_input">
{{ field }}
{%- if field.errors -%}
{% for error in field.errors %}
<div class="form_field_error">
{{ error }}
</div>
<p class="form_field_error">{{ error }}</p>
{% endfor %}
{%- endif %}
{% if field.description -%}
<div class="form_field_description">{{ _(field.description) }}</div>
<p class="form_field_description">{{ _(field.description) }}</p>
{%- endif %}
</div>
{%- endmacro %}