1 <cd-modal [modalRef]=
"bsModalRef">
2 <ng-container i18n=
"form title|Example: Create Pool@@formTitle"
3 class=
"modal-title">{{ action | titlecase }} {{ resource | upperFirst }}
</ng-container>
5 <ng-container class=
"modal-content">
7 [formGroup]=
"formGroup"
9 <div class=
"modal-body">
12 <div class=
"form-group row">
13 <label class=
"cd-col-form-label"
14 [ngClass]=
"{'required': !viewing}"
17 <div class=
"cd-col-form-input">
23 formControlName=
"user">
25 class=
"form-control custom-select"
26 formControlName=
"user"
30 *
ngIf=
"userCandidates !== null"
31 [ngValue]=
"null">-- Select a username --
</option>
32 <option *
ngFor=
"let userCandidate of userCandidates"
33 [value]=
"userCandidate">{{ userCandidate }}
</option>
35 <span class=
"invalid-feedback"
36 *
ngIf=
"formGroup.showError('user', frm, 'required')"
37 i18n
>This field is required.
</span>
41 <!-- Auto-generate key -->
42 <div class=
"form-group row"
44 <div class=
"cd-col-form-offset">
45 <div class=
"custom-control custom-checkbox">
46 <input class=
"custom-control-input"
49 formControlName=
"generate_key">
50 <label class=
"custom-control-label"
52 i18n
>Auto-generate key
</label>
58 <div class=
"form-group row"
59 *
ngIf=
"!formGroup.getValue('generate_key')">
60 <label class=
"cd-col-form-label"
61 [ngClass]=
"{'required': !viewing}"
63 i18n
>Access key
</label>
64 <div class=
"cd-col-form-input">
65 <div class=
"input-group">
66 <input id=
"access_key"
70 formControlName=
"access_key">
71 <span class=
"input-group-append">
74 cdPasswordButton=
"access_key">
78 cdCopy2ClipboardButton=
"access_key">
82 <span class=
"invalid-feedback"
83 *
ngIf=
"formGroup.showError('access_key', frm, 'required')"
84 i18n
>This field is required.
</span>
89 <div class=
"form-group row"
90 *
ngIf=
"!formGroup.getValue('generate_key')">
91 <label class=
"cd-col-form-label"
92 [ngClass]=
"{'required': !viewing}"
94 i18n
>Secret key
</label>
95 <div class=
"cd-col-form-input">
96 <div class=
"input-group">
97 <input id=
"secret_key"
101 formControlName=
"secret_key">
102 <span class=
"input-group-append">
103 <button type=
"button"
104 class=
"btn btn-light"
105 cdPasswordButton=
"secret_key">
107 <button type=
"button"
108 class=
"btn btn-light"
109 cdCopy2ClipboardButton=
"secret_key">
113 <span class=
"invalid-feedback"
114 *
ngIf=
"formGroup.showError('secret_key', frm, 'required')"
115 i18n
>This field is required.
</span>
121 <div class=
"modal-footer">
122 <cd-submit-button *
ngIf=
"!viewing"
123 (submitAction)=
"onSubmit()"
124 i18n=
"form action button|Example: Create Pool@@formActionButton"
125 [form]=
"formGroup">{{ action | titlecase }} {{ resource | upperFirst }}
</cd-submit-button>
126 <cd-back-button [back]=
"bsModalRef.hide"></cd-back-button>