
{% extends 'account/profile/base.html' %}

{% load i18n widget_tweaks %}


{% block content %}

     {% if form.errors %}
        <div class="alert alert-danger">
            {{ form.errors.as_text }}
        </div>
    {% endif %}

    <form action="{% url 'account_change_password' %}" method="post" class="well">
        <h2>{% trans "Change Password" %}</h2>

        {% csrf_token %}

        <div class="form-group {% if form.oldpassword.errors %}has-error{% endif %}">
            <label for="{{ form.oldpassword.auto_id }}">
                {{ form.oldpassword.label }}
            </label>
            {{ form.oldpassword|add_class:"form-control unicase-form-control text-input" }}
        </div>

        <div class="form-group {% if form.password1.errors %}has-error{% endif %}">
            <label for="{{ form.password1.auto_id }}">
                {{ form.password1.label }}
            </label>
            {{ form.password1|add_class:"form-control unicase-form-control text-input" }}
        </div>

        <div class="form-group {% if form.password2.errors %}has-error{% endif %}">
            <label for="{{ form.password2.auto_id }}">
                {{ form.password2.label }}
            </label>
            {{ form.password2|add_class:"form-control unicase-form-control text-input" }}
        </div>

        <button type="submit" class="btn btn-primary">{% trans "Change Password" %}</button>

        <a href="{% url 'accounts:profile' %}" class="btn btn-default pull-right">{% trans 'Скасувати' %}</a>
    </form>

{% endblock %}
