diff --git a/app/assets/javascripts/recording.js b/app/assets/javascripts/recording.js index 3ff61642..f097cda4 100644 --- a/app/assets/javascripts/recording.js +++ b/app/assets/javascripts/recording.js @@ -37,5 +37,12 @@ $(document).on('turbolinks:load', function(){ win.focus(); }); }); + + // Handle recording delete modal + $(".delete-rec").click(function() { + $("#delete-rec-confirm").parent().attr("action", $(this).data("path")) + }) + + } }); \ No newline at end of file diff --git a/app/views/admins/components/_server_recording_row.html.erb b/app/views/admins/components/_server_recording_row.html.erb index c9c0c31c..47632ce1 100644 --- a/app/views/admins/components/_server_recording_row.html.erb +++ b/app/views/admins/components/_server_recording_row.html.erb @@ -73,9 +73,9 @@ <%= t("recording.email") %> <% end %> - <%= button_to delete_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]), method: :delete, class: "dropdown-item", "data-disable": "" do %> + <%= t("delete") %> - <% end %> + diff --git a/app/views/admins/server_recordings.html.erb b/app/views/admins/server_recordings.html.erb index a07b19cb..b2732e08 100644 --- a/app/views/admins/server_recordings.html.erb +++ b/app/views/admins/server_recordings.html.erb @@ -25,3 +25,5 @@ + +<%= render "shared/modals/delete_recording_modal" %> diff --git a/app/views/shared/_sessions.html.erb b/app/views/shared/_sessions.html.erb index 9f2e6465..22c1fa0e 100644 --- a/app/views/shared/_sessions.html.erb +++ b/app/views/shared/_sessions.html.erb @@ -124,3 +124,5 @@ + +<%= render "shared/modals/delete_recording_modal" %> diff --git a/app/views/shared/components/_recording_row.html.erb b/app/views/shared/components/_recording_row.html.erb index 695e46b1..986b87a4 100644 --- a/app/views/shared/components/_recording_row.html.erb +++ b/app/views/shared/components/_recording_row.html.erb @@ -81,9 +81,9 @@ <%= t("recording.email") %> <% end %> - <%= button_to delete_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]), method: :delete, class: "dropdown-item", "data-disable": "" do %> + <%= t("delete") %> - <% end %> + diff --git a/app/views/shared/modals/_delete_recording_modal.html.erb b/app/views/shared/modals/_delete_recording_modal.html.erb new file mode 100644 index 00000000..ec3692d5 --- /dev/null +++ b/app/views/shared/modals/_delete_recording_modal.html.erb @@ -0,0 +1,42 @@ +<% +# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/. +# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below). +# This program is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free Software +# Foundation; either version 3.0 of the License, or (at your option) any later +# version. +# +# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. +# You should have received a copy of the GNU Lesser General Public License along +# with BigBlueButton; if not, see . +%> + + diff --git a/config/locales/en.yml b/config/locales/en.yml index c99cd20a..b428f3fc 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -394,6 +394,10 @@ en: keep: Actually, I'll keep it. delete_warning: This will deactivate the user's account. All deactived users can be found under the deleted tab. warning: This decision is final. You will not be able to recover associated data. + delete_rec: + delete: I'm sure, delete this recording. + header: Are you sure you want to delete this recording? + warning: You will not be able to recover this recording delete_room: confirm: Are you sure you want to delete %{room}? delete: I'm sure, delete this room.