2015-11-18 13:50:48 +03:00
|
|
|
<div class="modal-body">
|
2019-12-13 17:20:29 +03:00
|
|
|
{{#if this.url}}
|
2016-09-24 12:10:08 +03:00
|
|
|
<div class="gh-image-uploader -with-image">
|
2019-12-13 17:20:29 +03:00
|
|
|
<div><img src={{this.url}}></div>
|
2021-06-16 19:56:25 +03:00
|
|
|
<a class="image-delete" title="Delete" {{action 'removeImage'}}>
|
2018-03-19 12:57:31 +03:00
|
|
|
{{svg-jar "trash"}}
|
2016-02-26 16:25:47 +03:00
|
|
|
<span class="hidden">Delete</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
2020-01-16 18:14:03 +03:00
|
|
|
<GhImageUploader
|
|
|
|
@image={{this.newUrl}}
|
|
|
|
@saveButton={{false}}
|
|
|
|
@update={{action "fileUploaded"}}
|
|
|
|
@uploadStarted={{action "isUploading"}}
|
|
|
|
@uploadFinished={{action "isUploading"}}
|
|
|
|
@accept={{this.model.accept}}
|
|
|
|
@extensions={{this.model.extensions}}
|
|
|
|
@uploadUrl={{this.model.uploadUrl}}
|
|
|
|
@paramsHash={{this.model.paramsHas}}
|
|
|
|
/>
|
2016-02-26 16:25:47 +03:00
|
|
|
{{/if}}
|
2015-11-18 13:50:48 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
2017-02-16 22:50:05 +03:00
|
|
|
<button {{action "closeModal"}} class="gh-btn"><span>Cancel</span></button>
|
2019-12-13 17:20:29 +03:00
|
|
|
{{#if this._isUploading}}
|
2021-03-05 15:16:43 +03:00
|
|
|
<button class="gh-btn gh-btn-black right gh-btn-icon disabled"><span>Save</span></button>
|
2017-07-31 12:44:26 +03:00
|
|
|
{{else}}
|
2021-03-05 15:16:43 +03:00
|
|
|
<GhTaskButton @task={{this.uploadImage}} @class="gh-btn gh-btn-black right gh-btn-icon" data-test-modal-accept-button={{true}} />
|
2017-07-31 12:44:26 +03:00
|
|
|
{{/if}}
|
2017-01-26 14:17:34 +03:00
|
|
|
</div>
|