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'){ if (data.locked == 'yes'){
$('#lockLabel').addClass('btn-danger active'); $('#lockLabel').addClass('btn-danger active');
$('#lockButton').prop('checked', true); $('#lockButton').prop('checked', true);
$('#lockedSet').bootstrapSwitch('state', true);
} }
if (data.ask_for_name == 'yes'){ if (data.ask_for_name == 'yes'){
$('#askForNameLabel').addClass('btn-danger active'); $('#askForNameLabel').addClass('btn-danger active');
$('#askForNameButton').prop('checked', true); $('#askForNameButton').prop('checked', true);
$('#askForNameSet').bootstrapSwitch('state', true);
} }
if (data.join_auth == 'yes'){ if (data.join_auth == 'yes'){
$('#joinPassLabel').addClass('btn-danger active'); $('#joinPassLabel').addClass('btn-danger active');

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

Loading…
Cancel
Save