<!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-paramspublic-add">
            <div class="form-group">
                <label class="col-sm-3 control-label">字段英文：</label>
                <div class="col-sm-8">
                    <input name="fieldEn" 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="fieldName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">字段类型：</label>
                <div class="col-sm-8">
                    <select name="fieldType" class="form-control m-b" th:with="type=${@dict.getType('field_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">最大长度：</label>
                <div class="col-sm-8">
                    <input name="maxLength" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否必填：</label>
                <div class="col-sm-8">
                    <select name="isRequired" class="form-control m-b" th:with="type=${@dict.getType('is_required')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">说明：</label>
                <div class="col-sm-8">
                    <input name="pamsexplain" 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="seq" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/paramspublic"
        $("#form-paramspublic-add").validate({
            focusCleanup: true
        });

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