{% extends 'base.html' %}

{% block content %}

<h1 class="text-center">Смена пароля</h1>

<form action="" method="post">
    {% csrf_token %}

    {{ form.old_password.label }}
    <input type="password" class="form-control mb-3" name="old_password">

    {% if form.old_password.errors %}
        {% for error in form.old_password.errors %}
            <div class="alert alert-danger">{{ error }}</div>
        {% endfor %}
    {% endif %}

    {{ form.new_password1.label }}
    <input type="password" class="form-control mb-3" name="new_password1">

    {% if form.new_password1.errors %}
        {% for error in form.new_password1.errors %}
            <div class="alert alert-danger">{{ error }}</div>
        {% endfor %}
    {% endif %}

    {{ form.new_password2.label }}
    <input type="password" class="form-control mb-3" name="new_password2">
    {% if form.new_password2.errors %}
        {% for error in form.new_password2.errors %}
            <div class="alert alert-danger">{{ error }}</div>
        {% endfor %}
    {% endif %}

    <button class="btn btn-success">Submit</button>

</form>

{% endblock %}