Prevent empty passwords in room conf

This commit is contained in:
Daniel Berteaud 2015-07-18 11:09:19 +02:00
parent 65edc1b470
commit 9a7f36083f
1 changed files with 8 additions and 0 deletions

View File

@ -327,12 +327,20 @@ $('#configureRoomForm').submit(function(e){
$('#joinPassConfirm').notify(localize('PASSWORDS_DO_NOT_MATCH'), 'error');
return false;
}
if ($('#joinPassFields').css('display') !== 'none' && $('#joinPass').val() === ''){
$('#joinPass').notify(localize('PASSWORDS_CANNOT_BE_EMPTY'), 'error');
return false;
}
}
if ($('#ownerPassSet').bootstrapSwitch('state')){
if ($('#ownerPass').val() !== $('#ownerPassConfirm').val()){
$('#ownerPassConfirm').notify(localize('PASSWORDS_DO_NOT_MATCH'), 'error');
return false;
}
if ($('#ownerPassFields').css('display') !== 'none' && $('#ownerPass').val() === ''){
$('#ownerPass').notify(localize('PASSWORDS_CANNOT_BE_EMPTY'), 'error');
return false;
}
}
var validEmail = true;
$('.email-list').find('input').each(function(index, input){