{% extends 'snippet/layout.html' %}
{% load forum_extras %}

{% block main %}
    <div class="container-box">
        <form class="form-horizontal" action='' method="POST">
            <fieldset>
                <div id="legend">
                    <legend class="">用户密码设置</legend>
                </div>
                {% if success_message %}
                <ul class="alert alert-success">
                    <li>{{ success_message }}</li>
                </ul>
                {% endif %}
                {{ errors|dump_errors }}
                <div class="control-group">
                    <!-- Password-->
                    <label class="control-label" for="password_old">当前密码</label>
                    <div class="controls">
                        <input type="password" id="password_old" name="password_old" placeholder="" class="input-xlarge">
                        <p class="help-block">密码不少于4个字符</p>
                    </div>
                </div>

                <div class="control-group">
                    <!-- Password-->
                    <label class="control-label" for="password">新密码</label>
                    <div class="controls">
                        <input type="password" id="password" name="password" placeholder="" class="input-xlarge">
                        <p class="help-block">密码不少于4个字符</p>
                    </div>
                </div>

                <div class="control-group">
                    <!-- Password -->
                    <label class="control-label" for="password_confirm">新密码（确认）</label>
                    <div class="controls">
                        <input type="password" id="password_confirm" name="password_confirm" placeholder="" class="input-xlarge">
                        <p class="help-block">请再次输入新密码</p>
                    </div>
                </div>

                <div class="control-group">
                    <!-- Button -->
                    <div class="controls">
                        <button class="btn btn-success">保存改动</button>
                        <a href="/setting/" class="ml10 btn">返回设置页</a>
                    </div>
                </div>
            </fieldset>
            {% csrf_token %}
        </form>
    </div>
{% endblock %}

{% block sidebar %}
    <div class="sidenav container-box">
        <ul>
            <li><a href="/setting/">用户中心</a></li>
            <li><a href="/setting/avatar/">设置头像</a></li>
            <li class="current"><a href="/setting/password/">设置密码</a></li>
            <li><a href="/">返回首页</a></li>
        </ul>
    </div>
{% endblock %}
