Initial commit
This commit is contained in:
20
app/views/videos/new.html.erb
Normal file
20
app/views/videos/new.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="card shadow-sm">
|
||||
<%= card_header text: t(".heading"), subtext: t(".subheading"), close_action_path: [@project, @video] %>
|
||||
<div class="card-body">
|
||||
<%= errors_summary_for @video %>
|
||||
<%= render "form", video: @video, model: [@project, @video] %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= javascript_tag nonce: true do %>
|
||||
$(document).off("turbolinks:before-visit");
|
||||
$(document).on("turbolinks:before-visit", function() {
|
||||
if ($(".progress-bar").length > 0) {
|
||||
let result = confirm("Leaving this page while uploading will terminate any file uploads. Are you sure you want to leave?");
|
||||
if (result === true) {
|
||||
$(document).off("turbolinks:before-visit");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user