<!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-words-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">
                        <input name="errorRule" class="form-control" type="text">
                    </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="errorType" class="form-control" th:with="type=${@dict.getType('trs_policy_error_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">
                        <select name="errorGrade" class="form-control" th:with="type=${@dict.getType('trs_error_grade')}">
                            <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 name="accord" class="form-control" type="text" >
                    </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 name="source" class="form-control" type="text" >
                    </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 name="linkurl" class="form-control" type="text" >
                    </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/words"
        $("#form-words-add").validate({
            focusCleanup: true
        });

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