mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Overriding the broken _destroy partial so failure to destroy is shown as intended
This commit is contained in:
17
app/views/spree/admin/shared/_destroy.js.erb
Normal file
17
app/views/spree/admin/shared/_destroy.js.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
notice_div = $('.flash.notice');
|
||||
<% notice = flash.discard(:notice)
|
||||
if notice %>
|
||||
if (notice_div.length > 0) {
|
||||
notice_div.html("<%= notice %>");
|
||||
notice_div.show();
|
||||
} else {
|
||||
if ($("#content .toolbar").length > 0) {
|
||||
$("#content .toolbar").before('<div class="flash notice"><%= notice %></div>');
|
||||
} else {
|
||||
$("#progress").before('<div class="flash notice"><%= notice %></div>');
|
||||
}
|
||||
} <%
|
||||
end %>
|
||||
|
||||
<%= render :partial => '/spree/admin/shared/update_order_state' if @order %>
|
||||
|
||||
Reference in New Issue
Block a user