Update buttons in the new config menu when joining the room

master
Daniel Berteaud 10 years ago
parent 41d1282e4b
commit a4a1f78a7d
  1. 2
      public/js/vroom.js
  2. 8
      templates/default/configure_modal.html.ep

@ -564,10 +564,12 @@ function initVroom(room) {
if (data.locked == 'yes'){
$('#lockLabel').addClass('btn-danger active');
$('#lockButton').prop('checked', true);
$('#lockedSet').bootstrapSwitch('state', true);
}
if (data.ask_for_name == 'yes'){
$('#askForNameLabel').addClass('btn-danger active');
$('#askForNameButton').prop('checked', true);
$('#askForNameSet').bootstrapSwitch('state', true);
}
if (data.join_auth == 'yes'){
$('#joinPassLabel').addClass('btn-danger active');

@ -12,19 +12,19 @@
<div class="modal-body">
<form id ="configureRoomForm" class="form-horizontal" role="form">
<div class="form-group">
<label class="col-sm-4 control-label" for="locked">
<label class="col-sm-4 control-label" for="lockedSet">
<%=l 'LOCK_ROOM' %>
</label>
<div class="col-sm-8">
<input type="checkbox" class="bs-switch" id="locked">
<input type="checkbox" class="bs-switch" id="lockedSet">
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="askForName">
<label class="col-sm-4 control-label" for="askForNameSet">
<%=l 'ASK_FOR_NAME' %>
</label>
<div class="col-sm-8">
<input type="checkbox" class="bs-switch" id="askForName">
<input type="checkbox" class="bs-switch" id="askForNameSet">
</div>
</div>
<div class="form-group">

Loading…
Cancel
Save