Merge pull request #165 from houdiniproject/fix_remove_background_image

Fix for inability to remove background image
This commit is contained in:
Eric Schultz 2019-02-25 15:59:54 -06:00 committed by GitHub
commit d02fbc9232
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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() {