From b2fbbeaecab4576093203b4247fd9d494e810710 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Mon, 25 Feb 2019 14:53:06 -0600 Subject: [PATCH] Fix for inability to remove background image --- app/views/components/_upload_background_image.html.erb | 2 +- client/js/campaigns/show/admin.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/components/_upload_background_image.html.erb b/app/views/components/_upload_background_image.html.erb index d997c1ca..cbece515 100644 --- a/app/views/components/_upload_background_image.html.erb +++ b/app/views/components/_upload_background_image.html.erb @@ -20,7 +20,7 @@ Upload <%= image_url ? 'Different Image' : '' %> > - + Remove Image diff --git a/client/js/campaigns/show/admin.js b/client/js/campaigns/show/admin.js index d69f4ed1..c4703b95 100644 --- a/client/js/campaigns/show/admin.js +++ b/client/js/campaigns/show/admin.js @@ -43,10 +43,11 @@ appl.def('remove_banner_image', function() { appl.remove_image(url, 'campaign', notification, payload) }) -appl.def('remove_background_image', function(url, resource) { +appl.def('remove_background_image', function() { + var url = '/nonprofits/' + app.nonprofit_id + '/campaigns/' + app.campaign_id var notification = 'Removing background image...' var payload = {remove_background_image : true} - appl.remove_image(url, resource, notification, payload) + appl.remove_image(url, 'campaign', notification, payload) }) appl.def('count_story_words', function() {