{% load i18n %}
<tr id="form-{{field.name}}">
    <td style="text-align:right;">
        {% trans field.label %}
    </td>
    <td>
        <div class="{{css_class|default:"ym-fbox-text"}}">
        {{ field }}
        </div>
        {% if field.help_text %}<p class="dimmed">{{ field.help_text }}</p>{% endif %}
        <div class="ym-fbox-text ym-error">
            {% for error in field.errors %}
                <p class="ym-message">{% trans error %}</p>
            {% endfor %}
        </div>
    </td>
</tr>
{% load i18n %}
<tr id="form-{{field.name}}">
    <td style="text-align:right;">
    {% if field.errors %}<div class="ym-fbox-text ym-error"><span class="ym-message">{% endif %}
        {% trans field.label %}
    {% if field.errors %}</span></div>{% endif %}
    </td>
    <td>
        <div class="{{css_class|default:'ym-fbox-text'}} {% if field.errors %}ym-error{% endif %}">
        {{ field }}
        </div>
        <div class="ym-fbox-text ym-error">
            {% for error in field.errors %}
                <p class="ym-message">{% trans error %}</p>
            {% endfor %}
        </div>
        
        {% if field.help_text %}<p class="dimmed">{{ field.help_text }}</p>{% endif %}
    </td>
</tr>
Improve the appearance of the forms in case of errors
Improve the appearance of the forms in case of errors

Now, the the field itself is marked with 'ym-error' and the error message
appears directly under the field, without the description being between them.
Also, the field name is highlighted.
