update dhcp check

This commit is contained in:
2022-11-18 09:46:24 +07:00
parent 8954a2fc25
commit 5450124be9
6 changed files with 67 additions and 50 deletions

View File

@@ -125,6 +125,8 @@ function ValidateIPaddress(ipaddress) {
function validData(inputName) {
var ip = $("input[name='" + inputName + "']").val();
if (ip == "" && document.getElementById('dhcp_check').checked)
return true;
if (!ValidateIPaddress(ip)) {
common.error(inputName, "");
return false;
@@ -160,6 +162,7 @@ function changeIP(e) {
gateway: $("input[name='gateway']").val(),
dns1: $("input[name='dns1']").val(),
dns2: $("input[name='dns2']").val(),
dhcp: document.getElementById('dhcp_check').checked
},
success: function (data) {
common.modalBlock(false);