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){
-
+
-
-
+