Skip to content

Commit

Permalink
refactor upload modal
Browse files Browse the repository at this point in the history
  • Loading branch information
amtuannguyen committed Oct 25, 2024
1 parent 3431db3 commit 2c922f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$('#file_upload_modal').remove();
$('body').append('<%= j render "modal" %>');
$('body').append('<%= j render partial: "modal", formats: :html %>');
$('#file_upload_modal .invalid-feedback').empty().hide();
(new bootstrap.Modal($('#file_upload_modal'))).show();

Expand Down
2 changes: 1 addition & 1 deletion app/views/documents/edit.js.erb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%= render partial: 'upload_modal', formats: :js %>
<%= render partial: 'modal', formats: :js %>
2 changes: 1 addition & 1 deletion app/views/documents/new.js.erb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%= render partial: 'upload_modal', formats: :js %>
<%= render partial: 'modal', formats: :js %>

0 comments on commit 2c922f8

Please sign in to comment.