diff --git a/release/src/router/www/client_function.js b/release/src/router/www/client_function.js index cd03a740a83..70869690512 100644 --- a/release/src/router/www/client_function.js +++ b/release/src/router/www/client_function.js @@ -155,6 +155,7 @@ var totalClientNum = { } var setClientAttr = function(){ + this.hostname = ""; this.type = ""; this.defaultType = "0"; this.name = ""; @@ -623,6 +624,7 @@ function genClientList(){ continue; } + clientList[thisClientMacAddr].hostname = thisClient[2]; if(typeof clientList[thisClientMacAddr] != "undefined"){ if(clientList[thisClientMacAddr].ipMethod == "DHCP") { if(clientList[thisClientMacAddr].ip == thisClient[1] || clientList[thisClientMacAddr].ip == "offline") diff --git a/release/src/router/www/index.asp b/release/src/router/www/index.asp index d878ddb3bd0..66895448ae3 100644 --- a/release/src/router/www/index.asp +++ b/release/src/router/www/index.asp @@ -985,6 +985,8 @@ function validForm(){ tmpArray[index] = document.getElementById("macaddr_field").value; tmpArray[index] += ">"; tmpArray[index] += document.getElementById("ipaddr_field").value; + tmpArray[index] += ">"; + tmpArray[index] += document.getElementById("hostname_field").value; document.list_form.dhcp_staticlist.value = tmpArray.join("<"); } }); @@ -1431,6 +1433,8 @@ function popupEditBlock(clientObj){ document.getElementById('ipaddr_field_orig').value = clientObj.ip; document.getElementById('ipaddr_field').value = clientObj.ip; + document.getElementById('hostname_field').value = clientObj.hostname; + document.getElementById('ipaddr_field').disabled = true; $("#ipaddr_field").addClass("client_input_text_disabled"); if(sw_mode == "1") { @@ -1719,6 +1723,8 @@ function addToList(macAddr){ document.list_form.dhcp_staticlist.value += macAddr; document.list_form.dhcp_staticlist.value += ">"; document.list_form.dhcp_staticlist.value += document.getElementById("ipaddr_field").value; + document.list_form.dhcp_staticlist.value += ">"; + document.list_form.dhcp_staticlist.value += document.getElementById("hostname_field").value; } } @@ -2049,6 +2055,7 @@ function setDefaultIcon() {
+