Fix for inability to remove background image

This commit is contained in:
Eric Schultz 2019-02-25 14:53:06 -06:00 committed by Eric Schultz
parent 0715d78f8c
commit b2fbbeaeca
2 changed files with 4 additions and 3 deletions

View file

@ -20,7 +20,7 @@
Upload <%= image_url ? 'Different Image' : '' %>
</button>
<a class='button--small red u-marginTop--10 u-width--full' <%= image_url ? '' : 'disabled' %>>
<!--= on 'click' (confirm 'Are you sure?' remove_background_image -->
<!--= on 'click' (confirm 'Are you sure?' remove_background_image ) -->
Remove Image
</a>
</div>

View file

@ -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() {