]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component.ts
import 15.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / components / critical-confirmation-modal / critical-confirmation-modal.component.ts
index 868c6d6ea42bd98eabb577e954938874f38115e1..90395214331f3b4b61d89851be12c8bb6abeb28b 100644 (file)
@@ -24,13 +24,19 @@ export class CriticalConfirmationModalComponent implements OnInit {
   itemNames: string[];
   actionDescription = 'delete';
 
+  childFormGroup: CdFormGroup;
+  childFormGroupTemplate: TemplateRef<any>;
+
   constructor(public modalRef: BsModalRef) {}
 
   ngOnInit() {
-    this.deletionForm = new CdFormGroup({
+    const controls = {
       confirmation: new FormControl(false, [Validators.requiredTrue])
-    });
-
+    };
+    if (this.childFormGroup) {
+      controls['child'] = this.childFormGroup;
+    }
+    this.deletionForm = new CdFormGroup(controls);
     if (!(this.submitAction || this.submitActionObservable)) {
       throw new Error('No submit action defined');
     }