|
1 | | -<cd-modal [modalRef]="activeModal"> |
2 | | - <ng-container i18n="form title" |
3 | | - class="modal-title">Create Realm/Zone Group/Zone |
4 | | - </ng-container> |
5 | | - |
6 | | - <ng-container class="modal-content"> |
7 | | - <form name="createMultisiteEntitiesForm" |
8 | | - #formDir="ngForm" |
9 | | - [formGroup]="createMultisiteEntitiesForm" |
10 | | - novalidate> |
11 | | - <div class="modal-body"> |
| 1 | +<cds-modal size="sm" |
| 2 | + [open]="open" |
| 3 | + [hasScrollingContent]="false" |
| 4 | + (overlaySelected)="closeModal()"> |
| 5 | + <cds-modal-header (closeSelect)="closeModal()"> |
| 6 | + <h3 cdsModalHeaderHeading |
| 7 | + i18n>Create Realm/Zone Group/Zone</h3> |
| 8 | + <cd-help-text [formAllFieldsRequired]="true"></cd-help-text> |
| 9 | + </cds-modal-header> |
| 10 | + <form |
| 11 | + name="createMultisiteEntitiesForm" |
| 12 | + #formDir="ngForm" |
| 13 | + [formGroup]="createMultisiteEntitiesForm" |
| 14 | + novalidate |
| 15 | + > |
| 16 | + <div cdsModalContent> |
12 | 17 | <cd-alert-panel type="info" |
13 | | - spacingClass="mb-3">The realm/zone group/zone created will be set as default and master. |
| 18 | + spacingClass="mt-3" |
| 19 | + i18n>The realm/zone group/zone created will be set as default and master. |
14 | 20 | </cd-alert-panel> |
15 | | - <div class="form-group row"> |
16 | | - <label class="cd-col-form-label required" |
17 | | - for="realmName" |
18 | | - i18n>Realm Name</label> |
19 | | - <div class="cd-col-form-input"> |
20 | | - <input class="form-control" |
21 | | - type="text" |
22 | | - placeholder="Realm name..." |
23 | | - id="realmName" |
24 | | - name="realmName" |
25 | | - formControlName="realmName"> |
26 | | - <span class="invalid-feedback" |
27 | | - *ngIf="createMultisiteEntitiesForm.showError('realmName', formDir, 'required')" |
28 | | - i18n>This field is required.</span> |
29 | | - </div> |
| 21 | + <div class="form-item"> |
| 22 | + <cds-text-label |
| 23 | + labelInputID="realmName" |
| 24 | + [invalid]="createMultisiteEntitiesForm.controls.realmName.invalid && |
| 25 | + createMultisiteEntitiesForm.controls.realmName.dirty" |
| 26 | + [invalidText]="realmNameError" |
| 27 | + i18n |
| 28 | + >Realm Name |
| 29 | + <input |
| 30 | + cdsText |
| 31 | + type="text" |
| 32 | + id="realmName" |
| 33 | + formControlName="realmName" |
| 34 | + [invalid]=" |
| 35 | + createMultisiteEntitiesForm.controls.realmName.invalid && |
| 36 | + createMultisiteEntitiesForm.controls.realmName.dirty" |
| 37 | + [autofocus]="true" |
| 38 | + modal-primary-focus |
| 39 | + /> |
| 40 | + </cds-text-label> |
| 41 | + <ng-template #realmNameError> |
| 42 | + <span |
| 43 | + class="invalid-feedback" |
| 44 | + *ngIf="createMultisiteEntitiesForm.showError('realmName', formDir, 'required')" |
| 45 | + i18n |
| 46 | + >This field is required.</span |
| 47 | + > |
| 48 | + </ng-template> |
30 | 49 | </div> |
31 | | - <div class="form-group row"> |
32 | | - <label class="cd-col-form-label required" |
33 | | - for="zonegroupName" |
34 | | - i18n>Zone Group Name</label> |
35 | | - <div class="cd-col-form-input"> |
36 | | - <input class="form-control" |
37 | | - type="text" |
38 | | - placeholder="Zone group name..." |
39 | | - id="zonegroupName" |
40 | | - name="zonegroupName" |
41 | | - formControlName="zonegroupName"> |
42 | | - <span class="invalid-feedback" |
43 | | - *ngIf="createMultisiteEntitiesForm.showError('zonegroupName', formDir, 'required')" |
44 | | - i18n>This field is required.</span> |
45 | | - </div> |
| 50 | + |
| 51 | + <div class="form-item"> |
| 52 | + <cds-text-label |
| 53 | + labelInputID="zonegroupName" |
| 54 | + [invalid]="createMultisiteEntitiesForm.controls.zonegroupName.invalid && |
| 55 | + createMultisiteEntitiesForm.controls.zonegroupName.dirty" |
| 56 | + [invalidText]="zoneGroupNameError" |
| 57 | + i18n |
| 58 | + >Zone Group Name |
| 59 | + <input |
| 60 | + cdsText |
| 61 | + type="text" |
| 62 | + placeholder="Zone group name..." |
| 63 | + id="zonegroupName" |
| 64 | + name="zonegroupName" |
| 65 | + formControlName="zonegroupName" |
| 66 | + [invalid]="createMultisiteEntitiesForm.controls.zonegroupName.invalid && |
| 67 | + createMultisiteEntitiesForm.controls.zonegroupName.dirty" |
| 68 | + /> |
| 69 | + </cds-text-label> |
| 70 | + <ng-template #zoneGroupNameError> |
| 71 | + <span |
| 72 | + class="invalid-feedback" |
| 73 | + *ngIf="createMultisiteEntitiesForm.showError('zonegroupName', formDir, 'required')" |
| 74 | + i18n |
| 75 | + >This field is required.</span |
| 76 | + > |
| 77 | + </ng-template> |
46 | 78 | </div> |
47 | | - <div class="form-group row"> |
48 | | - <label class="cd-col-form-label required" |
49 | | - for="zoneName" |
50 | | - i18n>Zone Name</label> |
51 | | - <div class="cd-col-form-input"> |
52 | | - <input class="form-control" |
53 | | - type="text" |
54 | | - placeholder="Zone name..." |
55 | | - id="zoneName" |
56 | | - name="zoneName" |
57 | | - formControlName="zoneName"> |
58 | | - <span class="invalid-feedback" |
59 | | - *ngIf="createMultisiteEntitiesForm.showError('zoneName', formDir, 'required')" |
60 | | - i18n>This field is required.</span> |
61 | | - </div> |
| 79 | + |
| 80 | + <div class="form-item"> |
| 81 | + <cds-text-label |
| 82 | + labelInputID="zoneName" |
| 83 | + [invalid]="createMultisiteEntitiesForm.controls.zoneName.invalid && |
| 84 | + createMultisiteEntitiesForm.controls.zoneName.dirty" |
| 85 | + [invalidText]="zoneNameError" |
| 86 | + i18n |
| 87 | + >Zone Name |
| 88 | + <input |
| 89 | + cdsText |
| 90 | + type="text" |
| 91 | + placeholder="Zone name..." |
| 92 | + id="zoneName" |
| 93 | + name="zoneName" |
| 94 | + formControlName="zoneName" |
| 95 | + [invalid]="createMultisiteEntitiesForm.controls.zoneName.invalid && |
| 96 | + createMultisiteEntitiesForm.controls.zoneName.dirty" |
| 97 | + /> |
| 98 | + </cds-text-label> |
| 99 | + <ng-template #zoneNameError> |
| 100 | + <span |
| 101 | + class="invalid-feedback" |
| 102 | + *ngIf="createMultisiteEntitiesForm.showError('zoneName', formDir, 'required')" |
| 103 | + i18n |
| 104 | + >This field is required.</span |
| 105 | + > |
| 106 | + </ng-template> |
62 | 107 | </div> |
63 | 108 | </div> |
64 | | - <div class="modal-footer"> |
65 | | - <cd-form-button-panel (submitActionEvent)="submit()" |
66 | | - [form]="createMultisiteEntitiesForm"></cd-form-button-panel> |
67 | | - </div> |
68 | | - </form> |
69 | | - </ng-container> |
70 | | -</cd-modal> |
| 109 | + |
| 110 | + <cd-form-button-panel |
| 111 | + (submitActionEvent)="submit()" |
| 112 | + [form]="createMultisiteEntitiesForm" |
| 113 | + [modalForm]="true" |
| 114 | + > |
| 115 | + </cd-form-button-panel> |
| 116 | + </form> |
| 117 | +</cds-modal> |
0 commit comments