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

33 lines
1.1 KiB
Handlebars

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