<!DOCTYPE html>
<html lang="zh">
<head>
    <@meta/>
    <title>组织机构管理</title>
    <#include "admin/common/include_hplus.ftl">
    <#include "admin/common/include_form.ftl">
    <script src="<@contextPath/>/static/common/js/lib/md5.js" type="text/javascript"></script>
</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/organization/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">
                                <input class="form-control input-sm" type="text" required="" aria-required="true" name="name" value="${entity.name }">
                            </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="hr-line-dashed"></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="contactName" value="${entity.contactName }">
                            </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="contactMobile" value="${entity.contactMobile }">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></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="administratorRealName" value="${administrator.realName }" <#if entity.id??>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">
                                <input class="form-control input-sm" type="text" required="" aria-required="true" name="administratorUsername" value="${administrator.username }" <#if entity.id??>readonly</#if>>
                            </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="password" name="administratorPassword" <#if entity.id??>readonly</#if>>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></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="id" value="${entity.id }">
                        <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>