<!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" />
</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">用户姓名：</label>
                <div class="col-sm-8">
                    <textarea name="userName" class="form-control">[[*{userName}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">本系统登录名：</label>
                <div class="col-sm-8">
                    <input name="loginName" th:field="*{loginName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">子系统名称：</label>
                <div class="col-sm-8">
                    <input name="danganName" th:field="*{danganName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">子系统登录名：</label>
                <div class="col-sm-8">
                    <input name="danganLoginName" class="form-control" th:field="*{danganLoginName}"></input>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">关联时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="relateTime" th:value="${#dates.format(userRelate.relateTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-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>