<!DOCTYPE html>
<html lang="zh">
<head>
    <@meta/>
	<title>系统用户-编辑</title>
    <#include "admin/common/include_hplus.ftl">
    <#include "admin/common/include_form.ftl">
    <#include "admin/common/include_ztree.ftl">
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h3>${module.name}</h3><a href="javascript:history.back(-1);" class="btn btn-link">| 返回列表</a>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal m-t" action="<@contextPath/>/sys/user/saveEntity" method="post">
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="text-danger">*</span>所属部门：</label>
                            <div class="col-sm-8">
                                <div class="ztree-content input-ztree-2" data-url="<@contextPath/>/sys/dept/treeList">
                                    <div class="input-group">
                                        <input type="hidden" name="deptId" value="${dept.id}">
                                        <input type="text" class="form-control input-sm" autocomplete="off" name="deptName" value="${dept.name}">
                                        <div class="input-group-btn">
                                            <button class="btn btn-white btn-sm" type="button" aria-expanded="true"><span class="caret"></span></button>
                                        </div>
                                    </div>
                                    <div class="menuContent" style="display:none; position: absolute;z-index: 999;">
                                        <ul class="ztree" style="margin-top:0; "></ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="text-danger">*</span>姓名：</label>
                            <div class="col-sm-8">
                                <input class="form-control input-sm" type="text" required="" aria-required="true" name="realName" value="${entity.realName }">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="text-danger">*</span>用户名：</label>
                            <div class="col-sm-8">
                                <input class="form-control input-sm" type="text" required="" aria-required="true" aria-invalid="true" class="error" name="username" value="${entity.username }" <#if entity.oid??>readonly="readonly"</#if>>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="text-danger">*</span>状态：</label>
                            <div class="col-sm-8">
                                <div class="radio i-checks">
                                    <label><input type="radio" name="state" value="1" checked="">启用</label>
                                    <label><input type="radio" name="state" value="2" <#if entity.state == '2'>checked</#if> >禁用</label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">手机号码：</label>
                            <div class="col-sm-8">
                                <input class="form-control input-sm" type="text" name="mobileTel" value="${entity.mobileTel }">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">邮箱：</label>
                            <div class="col-sm-8">
                                <input class="form-control input-sm" type="email" name="email" value="${entity.email }">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">备注：</label>
                            <div class="col-sm-8">
                                <textarea class="form-control" name="remark">${entity.remark }</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button class="btn btn-primary" type="submit">提交</button>
                            </div>
                        </div>
						<input type="hidden" name="oid" value="${entity.oid }">
                        <input type="hidden" name="editType" value="${editForm.editType }">
                    </form>
                </div>
            </div>
            </div>
        </div>
    </div>
<script>
    $(function(){

        $.form.render(function () {
            history.go(-1);
        });

    });
</script>
</body>
</html>
