IP Mode Page to configure this page." end if (ButtonType and ButtonType == "config") then local inputTable = web.cgiToLuaTable(cgi) --automation part begin local tableIndex = 1 local errorFlag = "OK" validationTable = { function() return validations.checkboxValidate(inputTable["NimfConf.ConnectionType6"],"ifStatic6",5) end, function() return validations.ipv6AddrValidate(inputTable["ifStatic.StaticIp"],"IPv6 error") end, function() return validations.preLenChk(inputTable["ifStatic.PrefixLength"],"Prefix length error") end, function() return validations.ipv6AddrValidate(inputTable["ifStatic.Gateway"],"Gateway error") end, function() return validations.ipv6AddrValidate(inputTable["ifStatic.PrimaryDns"],"Primanry DNS error") end, function() return validations.ipv6AddrValidate(inputTable["ifStatic.SecondaryDns"],"Secondary DNS error","skip") end } while (tableIndex <= #(validationTable)) do validationFunc = validationTable[tableIndex] errorFlag, statusCode,field,skipValidations = validationFunc() if(errorFlag==1 or errorFlag == "ERROR") then statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode statusMessage = field .. ": " .. statusMessage break end if(skipValidations ~= "") then tableIndex = tableIndex + skipValidations + 1 else tableIndex = tableIndex + 1 end end if(errorFlag == "OK" or errorFlag == 0) then inputTable["NimfConf.LogicalIfName"] = "WAN1" errorFlag, statusCode = nimfView.ipv6WanConfig(inputTable, "1", "edit") -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) end web.goToPage(NextPage, true, true) else configRow = nimfView.ipv6WanConfigGet("WAN1") ?>