diff --git a/dist/js/functions.js b/dist/js/functions.js index 3588a3b5..e9164308 100644 --- a/dist/js/functions.js +++ b/dist/js/functions.js @@ -1,82 +1,9 @@ -function WiFiDown() { - var down = confirm("Take down wlan0 ?"); - if(down) { - } else { - alert("Action cancelled"); - } -} - -function UpdateNetworks() { - var existing = document.getElementById("networkbox").getElementsByTagName('div').length; - document.getElementById("Networks").value = existing; -} - -function AddNetwork() { -// existing = document.getElementById("networkbox").getElementsByTagName('div').length; -// existing++; - Networks++ - var Networks = document.getElementById('Networks').value; - document.getElementById('networkbox').innerHTML += '

Network '+Networks+'

\ -
\ -
\ -
'; - Networks++; - document.getElementById('Networks').value=Networks; - -} - -function AddScanned(network, open = false) { - - existing = document.getElementById("networkbox").getElementsByTagName('div').length; - var Networks = document.getElementById('Networks').value; - //if(existing != 0) { - Networks++; - //} - - document.getElementById('Networks').value=Networks; - document.getElementById('networkbox').innerHTML += '

Network '+Networks+'

'; - document.getElementById('networkbox').innerHTML += '
'; - - if ( open ) { - document.getElementById('networkbox').innerHTML += ''; - document.getElementById('Save').disabled = false; - } else { - document.getElementById('networkbox').innerHTML += ''; - document.getElementById('networkbox').innerHTML += '
'; - } - - document.getElementById('networkbox').innerHTML += '
'; - document.getElementById('ssid'+Networks).value = network; - if(existing == 0) { - Networks++ - document.getElementById('Networks').value = Networks; +function CheckPSK(psk, id) { + if(psk.value.length < 8 || psk.value.length > 63) { + psk.style.background='#FFD0D0'; + document.getElementById(id).disabled = true; + } else { + psk.style.background='#D0FFD0'; + document.getElementById(id).disabled = false; } } - -function CheckSSID(ssid) { - if(ssid.value.length>31) { - ssid.style.background='#FFD0D0'; - document.getElementById('Save').disabled = true; - } else { - ssid.style.background='#D0FFD0' - document.getElementById('Save').disabled = false; - } -} - -function CheckPSK(psk) { - if(psk.value.length < 8) { - psk.style.background='#FFD0D0'; - document.getElementById('Save').disabled = true; - } else { - psk.style.background='#D0FFD0'; - document.getElementById('Save').disabled = false; - } -} - -function DeleteNetwork(network) { - element = document.getElementById('Networkbox'+network); - element.parentNode.removeChild(element); - var Networks = document.getElementById('Networks').value; - Networks-- - document.getElementById('Networks').value = Networks; -} diff --git a/includes/configure_client.php b/includes/configure_client.php index 62331951..cc9a1b5b 100755 --- a/includes/configure_client.php +++ b/includes/configure_client.php @@ -174,14 +174,14 @@ function DisplayWPAConfig(){ --- - +
- /> + /> - + /> />
@@ -192,7 +192,7 @@ function DisplayWPAConfig(){
- +