Merge #16090 - Fix #16049 - checking if select input exists before retrieving the value, but not checking hostname select input value
Merge #16090 Fixes: #16049 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
commit
7c24eba29d
@ -14,13 +14,13 @@
|
||||
* @return boolean whether the form is validated or not
|
||||
*/
|
||||
function checkAddUser (theForm) {
|
||||
if (theForm.elements.pred_hostname.value === 'userdefined' && theForm.elements.hostname.value === '') {
|
||||
if (theForm.elements.hostname.value === '') {
|
||||
alert(Messages.strHostEmpty);
|
||||
theForm.elements.hostname.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (theForm.elements.pred_username.value === 'userdefined' && theForm.elements.username.value === '') {
|
||||
if ((theForm.elements.pred_username && theForm.elements.pred_username.value === 'userdefined') && theForm.elements.username.value === '') {
|
||||
alert(Messages.strUserEmpty);
|
||||
theForm.elements.username.focus();
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user