Skip to content

Commit

Permalink
Merge branch 'master' into snyk-fix-2b90e91c79fd95962fe6ee1bbbfe174a
Browse files Browse the repository at this point in the history
  • Loading branch information
jfederico authored Jun 14, 2024
2 parents 46a89fb + 5e4555c commit 6117c74
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
13 changes: 13 additions & 0 deletions app/javascript/packs/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,17 @@ $(document).on('turbolinks:load', function () {
checkSharedCodeCheckboxStatus();


// Show loading indicator when 'Update' or 'Cancel' buttons are pressed
const updateButton = $('#form-update-btn');
updateButton.on('click', (event) => {
event.preventDefault();
updateButton.attr('value', 'Loading...');
$('#edit-form').trigger('submit');
})

const cancelButton = $(this.getElementsByName('cancel'));
cancelButton.on('click', (event) => {
cancelButton.text('Loading...');
})

});
4 changes: 2 additions & 2 deletions app/views/rooms/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>

<%= form_with(model: room, local: true, class: "form fill", :url => room_path(@room, :launch_nonce => @launch_nonce) ) do |form| %>
<%= form_with(model: room, local: true, class: "form fill", :url => room_path(@room, :launch_nonce => @launch_nonce), name: 'edit-form', id: 'edit-form' ) do |form| %>
<% if room.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(room.errors.count, "error") %> prohibited this room from being saved:</h2>
Expand Down Expand Up @@ -167,7 +167,7 @@

<div class="actions pt-6">
<div class = "flex-row">
<%= form.submit t('default.room.update'), class: "btn-primary m-1 ml-0" %>
<%= form.submit t('default.room.update'), class: "btn-primary m-1 ml-0", id: 'form-update-btn' %>
<%= form.button t('default.room.cancel'), class: "btn-secondary m-1", name: "cancel" %>
</div>
</div>
Expand Down
12 changes: 11 additions & 1 deletion app/views/shared/components/_recording_row.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,17 @@
</svg>
</div>
</div>
<% end %>
<% end %>
<% else # other format %>
<%= link_to p[:url], :'data-toggle' => 'tooltip' , title: p[:type], target: "_blank", class: "hover:bg-white hover:text-blue-700" do %>
<div class="bg-gray-200 p-2 rounded hover:bg-gray-300">
<div class= "bg-bbb-blue rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 bg-bbb-blue text-white m-2" fill="none" viewBox="0 0 22 22" stroke-width="1.5" stroke="currentColor" >
<path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244" />
</svg>
</div>
</div>
<% end %>
<% end %>
<% end %> <%# end of unless %>
<% end %> <%# end of sorted playbacks %>
Expand Down

0 comments on commit 6117c74

Please sign in to comment.