{% extends 'vacancy_mgr/base.html' %}
{% load static %}
{% load humanize %}

    {% block head_title %}{{ target_user.full_name }} パスワード変更{% endblock %}
    {% block head %}
        <link rel="stylesheet" href="{% static 'users/css/style.css' %}">
    {% endblock %}

    {% block page_top %}{% endblock %}

    {% block header %}{% endblock %}

    {% block h1_title %}【パスワード変更】 {{ target_user.full_name }}{% endblock %}

    {% block contents %}
        <div id="user-form">
            <form action="{% url 'users_user_change_password' form.instance.idb64 %}" method="post" enctype="multipart/form-data">
                {% csrf_token %}
                {% if form.errors %}
                    {% for field in form %}
                        {% for error in field.errors %}
                            <p>*&nbsp;{{ field.label }} : {{ error }}</p>
                        {% endfor %}
                     {% endfor %}
                {% endif %}
                <div class="form-group row">
                    <div class="col-12 col-sm-3 col-form-label"><label>新しいパスワード</label></div>
                    <div class="col-12 col-sm-9">{{ form.new_password1 }}</div>
                    <div class="col-12 col-sm-3 col-form-label"><label>（確認用）</label></div>
                    <div class="col-12 col-sm-9">{{ form.new_password2 }}</div>
                    <div class="col-12 col-sm-3"></div>
                </div>
                <div class="form-group row">
                    <div class="col-2"></div>
                    <div class="col-4">
                        <input type="submit" value="変更" class="btn d-block mx-auto d-flex align-items-center btn-primary">
                    </div>
                    <div class="col-4">
                        <input type="button" value="キャンセル" onclick="history.back();" class="btn d-block mx-auto d-flex align-items-center btn-secondary">
                    </div>
                    <div class="col-2"></div>
                </div>
            </form>
        </div>
    {% endblock %}

    {% block footer %}{% endblock %}

    {% block page_bottom %}{% endblock %}
