33 lines
1.1 KiB
HTML
33 lines
1.1 KiB
HTML
<!--
|
|
Copyright since 2025 Mifos Initiative
|
|
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
-->
|
|
|
|
<h1 mat-dialog-title>{{ 'labels.heading.Upload Client Image' | translate }}</h1>
|
|
|
|
<div>
|
|
<mifosx-file-upload flex="60%" (change)="onFileSelect($event)" acceptFilter=".png,.jpeg,.jpg"></mifosx-file-upload>
|
|
|
|
@if (imagePreview) {
|
|
<div class="image-preview">
|
|
<span class="image-preview__label">Preview</span>
|
|
<img class="image-preview__img" [src]="imagePreview" alt="Selected profile image preview" />
|
|
<span class="image-preview__name">{{ image.name }}</span>
|
|
</div>
|
|
}
|
|
|
|
@if (previewError) {
|
|
<div class="image-preview__error">{{ previewError }}</div>
|
|
}
|
|
|
|
<mat-dialog-actions align="end">
|
|
<button mat-raised-button mat-dialog-close>{{ 'labels.buttons.Cancel' | translate }}</button>
|
|
<button mat-raised-button color="primary" [disabled]="!image || !imagePreview" [mat-dialog-close]="image">
|
|
{{ 'labels.buttons.Confirm' | translate }}
|
|
</button>
|
|
</mat-dialog-actions>
|
|
</div>
|