30 lines
1.2 KiB
HTML
30 lines
1.2 KiB
HTML
|
<ng-template #upload_modal let-modal>
|
||
|
<div class="modal-header">
|
||
|
<h4 class="modal-title" i18n>Edit image</h4>
|
||
|
<button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
|
||
|
<span aria-hidden="true">×</span>
|
||
|
</button>
|
||
|
</div>
|
||
|
<div class="modal-body">
|
||
|
<div class="cropper">
|
||
|
<image-cropper #imageCropper
|
||
|
[imageChangedEvent]="imageChangedEvent"
|
||
|
[maintainAspectRatio]="true"
|
||
|
format="jpeg"
|
||
|
[aspectRatio]="aspectRatio"
|
||
|
[autoCrop]="false"
|
||
|
(imageCropped)="imageCropped($event)"
|
||
|
(imageLoaded)="imageLoaded($event)"
|
||
|
(cropperReady)="cropperReady()"
|
||
|
(loadImageFailed)="loadImageFailed()"
|
||
|
></image-cropper>
|
||
|
</div>
|
||
|
<input #fileInput type="file" (change)="fileChangeEvent($event)" style="display:none" accept="image/*"/>
|
||
|
<span class="btn btn-primary" (click)="fileInput.click()" i18n>Select image</span>
|
||
|
</div>
|
||
|
<div class="modal-footer">
|
||
|
<button type="submit" class="btn btn-primary" i18n>Apply</button>
|
||
|
<button type="button" autofocus class="btn btn-secondary" (click)="modal.close('Save click')" i18n="@@buttonCancel">Cancel</button>
|
||
|
</div>
|
||
|
</ng-template>
|