增加标签、性质、类型弹框按钮国际化
去掉APP协议IP界面srcIp的 ipCheck 修改当源ip隐藏时,目的ip非0.0.0.0的校验
This commit is contained in:
@@ -181,17 +181,23 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
|
||||
var ipPattern=$(element).parents(".row").parent(".row").find("select[name$='ipPattern']").val();
|
||||
var srcIpAddress=$(element).parents(".row").parent(".row").find("input[name$='srcIpAddress']").val();
|
||||
var destIpAddress=$(element).parents(".row").parent(".row").find("input[name$='destIpAddress']").val();
|
||||
var srcIpIsHidden=$(element).parents(".row").parent(".row").find("input[name$='srcIpAddress']").is(":hidden");
|
||||
var destIpIsHidden=$(element).parents(".row").parent(".row").find("input[name$='destIpAddress']").is(":hidden");
|
||||
if(ipPattern==1){//ip/掩码格式
|
||||
srcIpAddress=srcIpAddress.indexOf("/") >-1 ?srcIpAddress.split("/")[0] : srcIpAddress;
|
||||
destIpAddress=destIpAddress.indexOf("/") >-1 ?srcIpAddress.split("/")[0] : srcIpAddress;
|
||||
destIpAddress=destIpAddress.indexOf("/") >-1 ?destIpAddress.split("/")[0] : destIpAddress;
|
||||
}else if (ipPattern==2){
|
||||
srcIpAddress=srcIpAddress.indexOf("-") >-1 ?srcIpAddress.split("-")[0] : srcIpAddress;
|
||||
destIpAddress=destIpAddress.indexOf("-") >-1 ?srcIpAddress.split("-")[0] : srcIpAddress;
|
||||
destIpAddress=destIpAddress.indexOf("-") >-1 ?destIpAddress.split("-")[0] : destIpAddress;
|
||||
}
|
||||
if(destIpIsHidden){
|
||||
if(srcIpIsHidden){
|
||||
if((srcIpAddress == destIpAddress)){
|
||||
$.validator.messages.ipCheck=$.validator.messages.srcIpIsNotValue+destIpAddress;
|
||||
$.validator.messages.ipCheck=$.validator.messages.destIpIsNotValue+destIpAddress;
|
||||
return false;
|
||||
}
|
||||
}else if(destIpIsHidden){
|
||||
if((srcIpAddress == destIpAddress)){
|
||||
$.validator.messages.ipCheck=$.validator.messages.srcIpIsNotValue+srcIpAddress;
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
destIpNotEqDestIp:" and destination IP ",
|
||||
IpNotEqDestIp:" can't the same",
|
||||
srcIpIsNotValue:"Sourse IP can't be ",
|
||||
destIpIsNotValue:"Destination IP can't be ",
|
||||
ipRange:"Wrong IP format or start IP and end IP in two subnet",
|
||||
ipRange1:"start IP should smaller than end IP",
|
||||
portCheck:"Please enter a correct port",
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
srcIpNotEqDestIp:"Sourse IP ",
|
||||
destIpNotEqDestIp:" and destination IP ",
|
||||
srcIpIsNotValue:"Sourse IP can't be ",
|
||||
destIpIsNotValue:"Destination IP can't be ",
|
||||
IpNotEqDestIp:" can't the same",
|
||||
portMaskRange:"Port and mask must between 0 and 65535.The correct pattern is \"port/mask\".",
|
||||
chooseAreaOrIsp:"The region and the oprater must choose one",
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
ipRange1:"起始IP值应小于结束IP值",
|
||||
portRange:"端口应小于65536,非0数字不能以0开头",
|
||||
srcIpIsNotValue:"源IP不能为 ",
|
||||
destIpIsNotValue:"目的IP不能为",
|
||||
srcIpNotEqDestIp:"源IP ",
|
||||
destIpNotEqDestIp:" 与目的IP ",
|
||||
IpNotEqDestIp:" 不能相同",
|
||||
|
||||
Reference in New Issue
Block a user