Browse Source

Merge pull request #9142 from ChantsovaEkaterina/bug/image-input-restore-hide-clear-button-option

Restore option to hide clear button for image input
pull/9151/head
Igor Kulikov 3 years ago
committed by GitHub
parent
commit
66b81aea25
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ui-ngx/src/app/shared/components/image-input.component.html
  2. 3
      ui-ngx/src/app/shared/components/image-input.component.ts

4
ui-ngx/src/app/shared/components/image-input.component.html

@ -25,7 +25,7 @@
<div class="tb-image-preview-text" *ngIf="!safeImageUrl && disabled; else elseBlock">{{ 'dashboard.empty-image' | translate }}</div>
<ng-template #elseBlock><img class="tb-image-preview" [src]="safeImageUrl" /></ng-template>
</div>
<button *ngIf="safeImageUrl && !disabled"
<button *ngIf="safeImageUrl && showClearButton && !disabled"
mat-icon-button color="primary"
class="tb-mat-24"
type="button"
@ -52,7 +52,7 @@
</div>
</div>
</div>
<button *ngIf="!showPreview && safeImageUrl && !disabled"
<button *ngIf="!showPreview && safeImageUrl && showClearButton && !disabled"
mat-icon-button color="primary"
class="tb-mat-24"
type="button"

3
ui-ngx/src/app/shared/components/image-input.component.ts

@ -65,6 +65,9 @@ export class ImageInputComponent extends PageComponent implements AfterViewInit,
@Input()
disabled: boolean;
@Input()
showClearButton = true;
@Input()
showPreview = true;

Loading…
Cancel
Save