Ghost/ghost/admin/app/templates/components/modals/upload-image.hbs

25 lines
818 B
Handlebars
Raw Normal View History

<div class="modal-body">
{{#if url}}
<div class="gh-image-uploader -with-image">
<div><img src={{url}}></div>
<a class="image-cancel icon-trash" title="Delete" {{action 'removeImage'}}>
<span class="hidden">Delete</span>
</a>
</div>
{{else}}
{{gh-image-uploader
image=newUrl
saveButton=false
update=(action 'fileUploaded')
accept=model.accept
extensions=model.extensions
uploadUrl=model.uploadUrl
}}
{{/if}}
</div>
<div class="modal-footer">
<button {{action "closeModal"}} class="gh-btn"><span>Cancel</span></button>
{{gh-task-button task=uploadImage class="gh-btn gh-btn-blue gh-btn-icon right" data-test-modal-accept-button=true}}
</div>