{% extends "base.html" %}

{% block title %}
    生成随机密码
{% endblock %}

{% block content %}

<div class="section section-breadcrumbs section-breadcrumbs-backend">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <h1>生成随机密码</h1>
            </div>
        </div>
    </div>
</div>

<hr/>


	<h4 class="col-md-offset-1">请导入符合<code>批量导入用户</code>页面要求格式的XLS文件，表的密码字段可以留空或随意填写。</h4>
    <h4 class="col-md-offset-1">导入完毕后将会用随机密码填充表的密码字段，然后您可以下载新表，到<code>批量导入用户</code>页面导入。</h4>
	<hr/>
    <form class="form-horizontal" role="form" action="{% url 'xlspasswdurl' %}" method="POST" enctype="multipart/form-data">
    {% csrf_token %}

        {% for item in form %}
            <div class="form-group">
                <label class="control-label col-md-2">{{item.label}}</label>
                <div class="col-md-2">
                    {{item}}
                </div>
                <div class="col-md-offset-2 col-md-10">
                    {{item.errors}}
                </div>
            </div>
        {% endfor %}

        <div class="col-md-offset-2">
                <button type="submit" class="btn btn-primary btn-lg">导入并生成随机密码</button>
        </div>
    </form>
{% endblock %}
