{% load i18n %}
<html>
    <head>
        <style>
            body {
                font-family: sans-serif;
            }
            .error {
                color: #BA2222;
            }
           .field {
               margin-bottom: 24px;
           }
           .field .help, .field ul li{
               font-size: 11px;
           }
        </style>
    </head>
    <body>
        <h1>{{ service }} setup</h1>

        {% if form.non_field_errors %}
        <div class="error">
            <h2>{% trans 'It seems that there are errors on the form' %}</h2>
            <ul>
                {% for error in form.non_field_errors %}
                <li>{{ error }}</li>
                {% endfor %}
            </ul>
        </div>
        {% endif %}

        <form method="post">
        {% csrf_token %}
        {% for field in form %}
            <div class="field{% if field.errors %} error{% endif %}">
                {{ field.label_tag }}
                {{ field }}
                {% if field.errors %}
                <ul>
                    {% for error in field.errors %}
                    <li>{{ error }}</li>
                    {% endfor %}
                </ul>
                {% endif %}
                <p class="help">{{ field.help_text }}</p>
            </div>
        {% endfor %}
        <input type="submit" value="{% trans 'Submit' %}"/>
        </form>

    </body>
</html>
