<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增领域常识')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-domain-add">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">词条：</label>
                    <div class="col-sm-8">
                        <input name="wrongWord" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">实体类型：</label>
                    <div class="col-sm-8">
                        <select name="domainType" class="form-control" th:with="type=${@dict.getType('trs_domain_type')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label ">生效开始时间：</label>
                    <div class="col-sm-8">
                        <input type="text" class="time-input" id="effectstart" placeholder="开始时间" name="effectstart"/>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label ">生效结束时间：</label>
                    <div class="col-sm-8">
                        <input type="text" class="time-input" id="effectend" placeholder="开始时间" name="effectend"/>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "project/domain"
        $("#form-domain-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-domain-add').serialize());
            }
        }
    </script>
</body>
</html>