12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <!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-notice-add">
- <div class="form-group" id="chargeErBanNo">
- <label class="col-sm-2 control-label">卿卿号:</label>
- <div class="col-sm-10">
- <input id="erbanNo" name="erbanNo" class="form-control" type="text" placeholder="请输入封禁卿卿号"/>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">封禁原因:</label>
- <div class="col-sm-10">
- <input id="blockDesc" name="blockDesc" class="form-control" type="text" placeholder="请输入封禁原因" required/>
- </div>
- </div>
- <div class="form-group" id="chargeBlockIp">
- <label class="col-sm-2 control-label">封禁IP:</label>
- <div class="col-sm-10">
- <input id="blockIp" name="blockIp" class="form-control" type="text" placeholder="请输入封禁IP"/>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">封禁类型:</label>
- <div class="col-sm-10">
- <select name="blockType" id="blockType" class="form-control m-b" th:with="type=${@dict.getType('block_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-2 control-label">封禁时间:</label>
- <div class="col-sm-10">
- <select name="blockTime" id="blockTime" class="form-control m-b" th:with="type=${@dict.getType('banned_time')}">
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </div>
- </div>
- </form>
- </div>
- <th:block th:include="include :: footer" />
- <th:block th:include="include :: summernote-js" />
- <script type="text/javascript">
- var prefix = ctx + "users/block";
- $("#form-notice-add").validate({
- focusCleanup: true
- });
- $(function(){
- $("#chargeBlockIp").hide();
- $("#chargeErBanNo").show();
- $('input[name="erbanNo"]').attr("required", "true");
- $('input[name="blockIp"]').attr("required", "false");
- });
- $("#blockType").on("change", function (){
- var val = $(this).val();
- if(val == 3){
- $("#chargeBlockIp").show();
- $("#chargeErBanNo").hide();
- $('input[name="erbanNo"]').attr("required", "false");
- $('input[name="blockIp"]').attr("required", "true");
- }else{
- $("#chargeBlockIp").hide();
- $("#chargeErBanNo").show();
- $('input[name="erbanNo"]').attr("required", "true");
- $('input[name="blockIp"]').attr("required", "false");
- }
- });
-
- function submitHandler() {
- if ($.validate.form()) {
- $.operate.save(prefix + "/add", $('#form-notice-add').serialize());
- }
- }
- </script>
- </body>
- </html>
|