Prevent empty passwords in room conf

master
Daniel Berteaud 9 years ago
parent 65edc1b470
commit 9a7f36083f
  1. 8
      public/js/vroom.js

@ -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){

Loading…
Cancel
Save