mirror of
https://github.com/dani/vroom.git
synced 2024-06-30 15:23:41 +02:00
Move passwords hide/unhide code to the global scope
So it's also available from the admin interface
This commit is contained in:
parent
dc0443d32c
commit
8fa6fad617
|
@ -209,6 +209,27 @@ $('#joinPassConfirm').on('input', function() {
|
||||||
$('#joinPassConfirm').parent().addClass('has-error');
|
$('#joinPassConfirm').parent().addClass('has-error');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Hide or show password fields
|
||||||
|
$('#joinPassSet').on('switchChange.bootstrapSwitch', function(event, state) {
|
||||||
|
if (state){
|
||||||
|
$('#joinPassFields').show(200);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#joinPassFields').hide(200);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#ownerPassSet').on('switchChange.bootstrapSwitch', function(event, state) {
|
||||||
|
if (state){
|
||||||
|
$('#ownerPassFields').show(200);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#ownerPassFields').hide(200);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Used on the index page
|
// Used on the index page
|
||||||
function initIndex(){
|
function initIndex(){
|
||||||
var room;
|
var room;
|
||||||
|
@ -1633,24 +1654,6 @@ function initVroom(room) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Hide or show password fields
|
|
||||||
$('#joinPassSet').on('switchChange.bootstrapSwitch', function(event, state) {
|
|
||||||
if (state){
|
|
||||||
$('#joinPassFields').show(200);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$('#joinPassFields').hide(200);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('#ownerPassSet').on('switchChange.bootstrapSwitch', function(event, state) {
|
|
||||||
if (state){
|
|
||||||
$('#ownerPassFields').show(200);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$('#ownerPassFields').hide(200);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Submit the configuration form
|
// Submit the configuration form
|
||||||
$('#configureRoomForm').submit(function(e){
|
$('#configureRoomForm').submit(function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user