65 lines
2.6 KiB
HTML
65 lines
2.6 KiB
HTML
<section class="dialog">
|
|
<div [class.warn]="isDeleteAction" class="dialog-header heading-l">
|
|
{{ config.title }}
|
|
</div>
|
|
|
|
<div *ngIf="showToast && config.toastMessage" class="inline-dialog-toast toast-error">
|
|
<div [translate]="config.toastMessage"></div>
|
|
<a (click)="showToast = false" class="toast-close-button">
|
|
<mat-icon svgIcon="iqser:close"></mat-icon>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="dialog-content">
|
|
<p [class.heading]="isDeleteAction" [innerHTML]="config.question" class="mt-0 mb-8"></p>
|
|
<p *ngIf="config.details" [innerHTML]="config.details" class="mt-0"></p>
|
|
|
|
<div *ngIf="config.requireInput" class="iqser-input-group required w-300 mt-24">
|
|
<label>{{ inputLabel }}</label>
|
|
<input [(ngModel)]="inputValue" id="requiredConfirmInput" />
|
|
</div>
|
|
|
|
<div *ngIf="config.checkboxes.length > 0" class="mt-24 checkboxes-wrapper">
|
|
<ng-container *ngFor="let checkbox of config.checkboxes">
|
|
<mat-checkbox [(ngModel)]="checkbox.value" [class.error]="!checkbox.value && showToast" color="primary">
|
|
{{ checkbox.label | translate: config.translateParams }}
|
|
</mat-checkbox>
|
|
<ng-container *ngTemplateOutlet="checkbox.extraContent; context: { data: checkbox.extraContentData }"></ng-container>
|
|
</ng-container>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="dialog-actions">
|
|
<button
|
|
(click)="confirm(ConfirmOptions.CONFIRM)"
|
|
[disabled]="(config.requireInput && confirmationDoesNotMatch()) || config.disableConfirm"
|
|
color="primary"
|
|
id="confirm"
|
|
mat-flat-button
|
|
>
|
|
{{ config.confirmationText }}
|
|
</button>
|
|
|
|
<button
|
|
(click)="confirm(ConfirmOptions.SECOND_CONFIRM)"
|
|
*ngIf="config.alternativeConfirmationText"
|
|
[disabled]="config.requireInput && confirmationDoesNotMatch()"
|
|
[ngClass]="{ 'all-caps-label cancel': true }"
|
|
color="primary"
|
|
mat-flat-button
|
|
>
|
|
{{ config.alternativeConfirmationText }}
|
|
</button>
|
|
|
|
<div (click)="confirm(ConfirmOptions.DISCARD_CHANGES)" *ngIf="config.discardChangesText" class="all-caps-label cancel">
|
|
{{ config.discardChangesText }}
|
|
</div>
|
|
|
|
<div (click)="deny()" *ngIf="!config.discardChangesText" class="all-caps-label cancel">
|
|
{{ config.denyText }}
|
|
</div>
|
|
</div>
|
|
|
|
<iqser-circle-button class="dialog-close" icon="iqser:close" mat-dialog-close></iqser-circle-button>
|
|
</section>
|