Skip to content

Commit

Permalink
fix: insert alert before modal-header
Browse files Browse the repository at this point in the history
Some blocks hide modal-header div to insert custom-tabs, so injecting
alert inside modal-header does not work. Injecting it before this header
works for all cases.
  • Loading branch information
navinkarkera committed Oct 22, 2024
1 parent 9547c8c commit eb6ab00
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion cms/static/js/views/modals/edit_xblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function($, _, Backbone, gettext, BaseModal, ViewUtils, XBlockViewUtils, XBlockE
},

createWarningToast: function(upstreamLink) {
this.$('.modal-window-alerts').html(this.loadTemplate('edit-upstream-alert')({
this.$('.modal-header').before(this.loadTemplate('edit-upstream-alert')({
upstreamLink: upstreamLink,
}));
},
Expand Down
2 changes: 0 additions & 2 deletions cms/templates/js/basic-modal.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<div class="modal-window <%- viewSpecificClasses %> modal-<%- size %> modal-type-<%- type %>" tabindex="-1" aria-labelledby="modal-window-title">
<div class="<%- name %>-modal">
<div class="modal-header">
<div class="modal-window-alerts">
</div>
<h2 id="modal-window-title" class="title modal-window-title">
<%- title %>
<% if (modalSRTitle) { %>
Expand Down

0 comments on commit eb6ab00

Please sign in to comment.