In the hotspot login page
In the username field
i have a little problem
some devices specially android mobile
leave space at the first of username field
and when the customer login it show an error that the user or password invild because most of them not notice the space that adding automatically to first of user field
so if any one can help me to edit the login page to auto remove spaces from user and password field
Edit login.html and replace the doLogin() function with the code below. I assume you want to disallow all special characters, so this allows only lowercase and numbers.
function doLogin() {
if (!/^[a-z0-9]+$/.test(document.login.username.value)) {
alert("ERROR: Username must only contain lower case letters and numbers!");
document.login.username.focus();
return false;
}
document.sendin.username.value = document.login.username.value;
document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
document.sendin.submit();
return false;
}