Allow rooms to have an optional access code (#646)

This commit is contained in:
shawn-higgins1
2019-07-22 13:12:44 -04:00
committed by Jesus Federico
parent a055b88eb7
commit 7d1c9e87a9
13 changed files with 179 additions and 34 deletions

View File

@ -13,9 +13,21 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
<%= render 'shared/room_event' do %>
<% valid_access_code = @room.access_code.nil? || @room.access_code.empty? || @room.access_code == session[:access_code] %>
<%= render 'shared/room_event', render_recordings: valid_access_code do %>
<% if room_authentication_required %>
<h2><%= t("administrator.site_settings.authentication.user-info") %></h2>
<% elsif !valid_access_code %>
<%= form_for :room, url: login_room_path(@room.uid) do |f| %>
<div class="input-group join-input">
<%= f.text_field :access_code,
required: true,
class: "form-control join-form",
placeholder: t("room.enter_the_access_code"),
value: "" %>
<%= f.submit t("room.login"), class: "btn btn-primary btn-sm col-sm-3 form-control join-form" %>
</div>
<% end %>
<% else %>
<%= form_for room_path(@room), method: :post do |f| %>
<div class="input-group join-input">

View File

@ -13,7 +13,7 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
<%= render 'shared/room_event' do %>
<%= render 'shared/room_event', render_recordings: true do %>
<div class="row">
<div class="col-9">
<h3><%= t("room.wait.message") %></h3>