diff --git a/src/main/webapp/WEB-INF/include/form/areaInfo.jsp b/src/main/webapp/WEB-INF/include/form/areaInfo.jsp index 3c5005f79..6be2396e3 100644 --- a/src/main/webapp/WEB-INF/include/form/areaInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/areaInfo.jsp @@ -10,6 +10,7 @@ $(function(){ var name=$(this).attr("id").replace("_areaCfg.",""); $(this).removeAttr("id"); $(this).attr("name","areaCfg["+len+"]."+name); + $(this).parents(".form-group").find("div[for^='_areaCfg']").attr("for","areaCfg["+len+"]."+name); $(this).selectpicker("refresh"); }); obj.removeClass("hidden"); @@ -23,6 +24,7 @@ $(function(){ }else if($(this).parent().parent().parent().attr("id")=="areaIsp"){ obj.find("[name^='areaCode']").each(function(){ $(this).attr("name","areaIsp["+len+"].area"); + $(this).parents(".form-group").find("div[for^='areaCode']").attr("for","areaIsp["+len+"].area"); $(this).selectpicker("refresh"); }); obj.find("[name^='ispCode']").each(function(){ @@ -49,6 +51,7 @@ function delAreaIp(obj){ var name=$(this).attr("name"); name=name.substring(name.lastIndexOf(".")+1,name.length); $(this).attr("name","areaCfg["+len+"]."+name); + $(this).parents(".form-group").find("div[for^='areaCfg']").attr("for","areaCfg["+len+"]."+name); }); len--; }); @@ -58,6 +61,18 @@ function delAreaIsp(obj){ var thisObj=$(obj); thisObj.parents(".container").remove(); var len=$("#areaIsp").find(".container:visible").size(); + if(len>0){ + len--; + $("#areaIsp").find(".container:visible").each(function(){ + $(this).find("[name^='areaIsp']").each(function(){ + var name=$(this).attr("name"); + name=name.substring(name.lastIndexOf(".")+1,name.length); + $(this).attr("name","areaIsp["+len+"]."+name); + $(this).parents(".form-group").find("div[for^='areaIsp']").attr("for","areaIsp["+len+"]."+name); + }); + len--; + }); + } }
@@ -107,9 +123,9 @@ function delAreaIsp(obj){
- +
-
+
-
- +
-
+
@@ -362,18 +379,18 @@ function delAreaIsp(obj){
- +
-
+
- +
-
+
@@ -382,18 +399,18 @@ function delAreaIsp(obj){
- +
-
+
- +
-
+
@@ -402,7 +419,7 @@ function delAreaIsp(obj){
- @@ -410,20 +427,20 @@ function delAreaIsp(obj){
-
+
-
-
+
diff --git a/src/main/webapp/WEB-INF/include/form/multiple/ipInfo.jsp b/src/main/webapp/WEB-INF/include/form/multiple/ipInfo.jsp index f40a2da4d..1ba595455 100644 --- a/src/main/webapp/WEB-INF/include/form/multiple/ipInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/multiple/ipInfo.jsp @@ -69,10 +69,10 @@
- + - +
@@ -166,10 +166,10 @@
- + - +
diff --git a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp index 6e4a24442..18d18b324 100644 --- a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp @@ -77,89 +77,23 @@ $(function(){ }); $("#inputFrom").validate({ rules: { - ipType: { - required: true, - }, - srcIp: { - required: true, - checkIp: true - }, - srcIpMask: { - required: true, - }, srcPort: { - required: true, max: 65535, min: 0 }, - srcPortMask: { - required: true, - }, - dstIp: { - required: true, - checkIp: true - }, - dstIpMask: { - required: true, - }, dstPort: { - required: true, max: 65535, min: 0 - }, - dstPortMask: { - required: true, - }, - direction: { - required: true, - }, - protocol: { - required: true, - }, - 'request.id': { - required: true, } }, messages: { - ipType: { - required: '', - }, - srcIp: { - required: '', - }, - srcIpMask: { - required: '', - }, srcPort: { - required: '', max: '范围0-65535!', min: '范围0-65535!' }, - srcPortMask: { - required: '', - }, - dstIp: { - required: '', - }, - dstIpMask: { - required: '', - }, dstPort: { - required: '', max: '范围0-65535!', min: '范围0-65535!' - }, - dstPortMask: { - required: '', - }, - direction: { - required: '', - }, - protocol: { - required: '', - }, - 'request.id': { - required: '', } }, errorPlacement: function(error,element){ @@ -212,7 +146,7 @@ $(function(){
- > @@ -226,7 +160,7 @@ $(function(){
- +
@@ -235,7 +169,7 @@ $(function(){
- +
@@ -246,7 +180,7 @@ $(function(){
- +
@@ -255,7 +189,7 @@ $(function(){
- +
@@ -266,7 +200,7 @@ $(function(){
- +
@@ -275,7 +209,7 @@ $(function(){
- +
@@ -286,7 +220,7 @@ $(function(){
- +
@@ -295,7 +229,7 @@ $(function(){
- +
@@ -306,7 +240,7 @@ $(function(){
- > @@ -318,7 +252,7 @@ $(function(){
- > @@ -332,7 +266,7 @@ $(function(){
- data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">