<form class="formValidate" method="post" action="{% url 'users:register' %}" novalidate="novalidate">
    <div class="form login-form">
        <div class="login-form__title">
            Zarejestruj się
        </div>
        <div class="login-form__description">
            Masz już konto? Przejdź do
            <a href="{% url 'users:login' %}">logowania</a>
        </div>
        {% csrf_token %}
        <div class="form__input {% if form.username.errors or form.non_field_errors %}has-error{% elif form.cleaned_data.username %}no-error{% endif %}">
            {{ form.username }}
            <span class="form__input__bar"></span>
            {% include 'users/modules/_form_field_errors.html' with errors=form.username.errors %}
            <label>{{ form.username.label }}</label>
        </div>
        <div class="form__input {% if form.email.errors or form.non_field_errors %}has-error{% elif form.cleaned_data.email %}no-error{% endif %}">
            {{ form.email }}
            <span class="form__input__bar"></span>
            {% include 'users/modules/_form_field_errors.html' with errors=form.email.errors %}
            <label>{{ form.email.label }}</label>
        </div>
        <div class="form__input {% if form.password1.errors or form.non_field_errors %}has-error{% elif form.cleaned_data.password1 %}no-error{% endif %}">
            {{ form.password1 }}
            <span class="form__input__bar"></span>
            {% include 'users/modules/_form_field_errors.html' with errors=form.password1.errors %}
            {% include 'users/modules/_form_field_errors.html' with errors=form.non_field_errors %}
            <label>{{ form.password1.label }}</label>
        </div>
        <div class="form__submit--register">
            <button type="submit" class="button button__login-single button__login-single--blue">Zarejestruj</button>
        </div>
    </div>
</form>
