core/modal/modal-confirm.component.ts
selector | c8y-confirm-modal |
templateUrl | ./modal-confirm.component.html |
Properties |
Methods |
Inputs |
Accessors |
constructor(modal: BsModalRef)
|
||||||
Parameters :
|
body |
Type : string
|
confirmOptions |
Type : ConfirmOptions
|
labels |
status |
Type : StatusType
|
Default value : Status.INFO
|
title |
Type : string
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
close |
Type : function
|
dismiss |
Type : function
|
result |
Type : Promise<boolean | literal type>
|
labels | ||||||
getlabels()
|
||||||
setlabels(labels: ModalLabels)
|
||||||
Parameters :
Returns :
void
|
classIcon |
getclassIcon()
|
classAlert |
getclassAlert()
|
<div class="c8y-prompt alert" [ngClass]="[classAlert]">
<h3 class="m-b-16 d-flex a-i-center" *ngIf="title">
<i class="dlt-c8y-icon" [ngClass]="[classIcon]"></i>
<span *ngIf="title">{{ title | translate }}</span>
</h3>
<p class="text-break-word m-b-16">{{ body | translate }}</p>
<div
class="c8y-checkbox plain m-b-8"
*ngFor="let co of confirmOptions | showIfFilter | async | keyvalue"
>
<label [title]="co.value.text | translate" class="c8y-checkbox">
<input
type="checkbox"
[checked]="co.value.checked"
(change)="co.value.checked = !co.value.checked"
/>
<span></span>
<span class="text-muted">{{ co.value.text | translate }}</span>
</label>
</div>
<ng-content></ng-content>
<div class="alert-footer">
<button
title="{{ labels.cancel | translate }}"
type="button"
class="btn btn-default"
*ngIf="labels.cancel !== null"
(click)="dismiss()"
>
{{ labels.cancel | translate }}
</button>
<button
title="{{ labels.ok | translate }}"
type="button"
class="btn btn-primary"
(click)="close()"
>
{{ labels.ok | translate }}
</button>
</div>
</div>