<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改子系统用户账号关联')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-userRelate-edit" th:object="${userRelate}">
            <input name="relateId" th:field="*{relateId}" type="hidden">

            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">子系统：</label>
                <div class="col-sm-7">
                    <select id="danganId" name="danganId" class="form-control" required th:field="*{danganId}">
                        <option value="">请选择</option>
                        <option th:each="dangan:${danganList}" th:text="${dangan.danganName}" th:value="${dangan.danganId}" ></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">子系统登录名：</label>
                <div class="col-sm-7">
                    <input name="danganLoginName" class="form-control" th:field="*{danganLoginName}"></input>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/userRelate";
        $("#form-userRelate-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-userRelate-edit').serialize());
            }
        }

        $("input[name='relateTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>