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