HTTP和SSL配置主表单界面增加使用tags的关键字属性不能为空的校验逻辑

This commit is contained in:
zhangwei
2018-06-04 10:21:44 +08:00
parent 1c0896f46e
commit 2e19ab7ce6
3 changed files with 53 additions and 18 deletions

View File

@@ -32,6 +32,7 @@
},
submitHandler : function(form) {
//loading('onloading...');
var flag = true;
//代表所有业务都隐藏了,提示必须增加一种业务数据
if($(".boxSolid").length ==$(".boxSolid.hidden").length){
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
@@ -44,12 +45,25 @@
top.$.jBox.tip("<spring:message code='one_more_area'/>", "<spring:message code='info'/>");
return;
}
//将disable属性的元素删除
$(".disabled").each(function(){
$(this).remove();
});
$("input[name$='exprType']").attr("disabled",false);
form.submit();
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
if($(this).val()==''){
$(this).parents(".form-group").find(
"div[for='"
+ $(this).attr("name")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
flag = false;
return;
}
})
if(flag){
//将disable属性的元素删除
$(".disabled").each(function(){
$(this).remove();
});
$("input[name$='exprType']").attr("disabled",false);
form.submit();
}
},
errorContainer : "#messageBox",
});
@@ -82,6 +96,7 @@
</script>
</head>
<body>
<span id="keywordError"><spring:message code="required"></spring:message></span>
<div class="page-content">
<div class="row">
<div class="col-md-12">