3 (overlaySelected)="closeModal()">
4 <cds-modal-header (closeSelect)="closeModal()">
5 <ng-container *ngTemplateOutlet="deletionHeading"></ng-container>
8 <section cdsModalContent>
9 <form name="deletionForm"
11 [formGroup]="deletionForm"
13 <cd-alert-panel *ngIf="infoMessage"
17 <p>{{ infoMessage }}</p>
19 <ng-container *ngTemplateOutlet="bodyTemplate; context: bodyContext"></ng-container>
20 <div class="question">
21 <span *ngIf="itemNames; else noNames">
22 <p *ngIf="itemNames.length === 1; else manyNames"
23 i18n>Are you sure that you want to {{ actionDescription | lowercase }} <strong>{{ itemNames[0] }}</strong>?</p>
24 <ng-template #manyNames>
25 <p i18n>Are you sure that you want to {{ actionDescription | lowercase }} the selected items?</p>
27 <li *ngFor="let itemName of itemNames"><strong>{{ itemName }}</strong></li>
31 <ng-template #noNames>
32 <p i18n>Are you sure that you want to {{ actionDescription | lowercase }} the selected {{ itemDescription }}?</p>
34 <ng-container *ngTemplateOutlet="childFormGroupTemplate; context:{form:deletionForm}"></ng-container>
35 <div class="form-item">
36 <ng-container *ngIf="impact == impactEnum.medium; else highImpactDeletion">
37 <cds-checkbox id="confirmation"
38 formControlName="confirmation"
42 i18n>Yes, I am sure.</cds-checkbox>
44 <ng-template #highImpactDeletion>
45 <cds-text-label label="Resource Name"
46 labelInputID="resource_name"
47 cdRequiredField="Resource Name"
48 [invalid]="!deletionForm.controls.confirmInput.valid && deletionForm.controls.confirmInput.dirty"
49 [invalidText]="ResourceError"
51 i18n-label>Resource Name
54 placeholder="Enter resource name to delete"
56 formControlName="confirmInput"
59 <ng-template #ResourceError>
60 <span *ngIf="deletionForm.showError('confirmInput', formDir, 'required')"
61 class="invalid-feedback">
62 <ng-container i18n>This field is required.</ng-container>
64 <span *ngIf="deletionForm.showError('confirmInput', formDir, 'matchResource')"
65 class="invalid-feedback">
66 <ng-container i18n>Enter the correct resource name.</ng-container>
74 <cd-form-button-panel (submitActionEvent)="callSubmitAction()"
75 (backActionEvent)="backAction ? callBackAction() : hideModal()"
77 [submitText]="(actionDescription | titlecase) + ' ' + itemDescription"
79 [submitBtnType]="(actionDescription === 'delete' || actionDescription === 'remove') ? 'danger' : 'primary'"></cd-form-button-panel>
83 <ng-template #deletionHeading>
84 <h3 cdsModalHeaderHeading
86 {{ actionDescription | titlecase }} {{ itemDescription }}