1 <div class="modal-header">
2 <h4 i18n="form title|Example: Create Pool@@formTitle"
3 class="modal-title float-left">{{ action | titlecase }} {{ resource | upperFirst }}</h4>
6 class="close float-right"
8 (click)="bsModalRef.hide()">
9 <span aria-hidden="true">×</span>
13 [formGroup]="formGroup"
15 <div class="modal-body">
18 <div class="form-group row"
19 [ngClass]="{':invalid': formGroup.showError('user', frm)}">
20 <label class="col-form-label col-sm-3"
22 <ng-container i18n>Username</ng-container>
23 <span class="required"
27 <div class="col-sm-9">
33 formControlName="user">
36 formControlName="user"
40 *ngIf="userCandidates !== null"
41 [ngValue]="null">-- Select a username --</option>
42 <option *ngFor="let userCandidate of userCandidates"
43 [value]="userCandidate">{{ userCandidate }}</option>
45 <span class="form-text text-muted"
46 *ngIf="formGroup.showError('user', frm, 'required')"
47 i18n>This field is required.</span>
51 <!-- Auto-generate key -->
52 <div class="form-group row"
54 <div class="offset-sm-3 col-sm-9">
55 <div class="custom-control custom-checkbox">
56 <input class="custom-control-input"
59 formControlName="generate_key">
60 <label class="custom-control-label"
62 i18n>Auto-generate key</label>
68 <div class="form-group row"
69 [ngClass]="{':invalid': formGroup.showError('access_key', frm)}"
70 *ngIf="!formGroup.getValue('generate_key')">
71 <label class="col-form-label col-sm-3"
73 <ng-container i18n>Access key</ng-container>
74 <span class="required"
78 <div class="col-sm-9">
79 <div class="input-group">
80 <input id="access_key"
84 formControlName="access_key">
85 <span class="input-group-append">
88 cdPasswordButton="access_key">
92 cdCopy2ClipboardButton="access_key">
96 <span class="form-text text-muted"
97 *ngIf="formGroup.showError('access_key', frm, 'required')"
98 i18n>This field is required.</span>
103 <div class="form-group row"
104 [ngClass]="{':invalid': formGroup.showError('secret_key', frm)}"
105 *ngIf="!formGroup.getValue('generate_key')">
106 <label class="col-form-label col-sm-3"
108 <ng-container i18n>Secret key</ng-container>
109 <span class="required"
113 <div class="col-sm-9">
114 <div class="input-group">
115 <input id="secret_key"
119 formControlName="secret_key">
120 <span class="input-group-append">
121 <button type="button"
122 class="btn btn-light"
123 cdPasswordButton="secret_key">
125 <button type="button"
126 class="btn btn-light"
127 cdCopy2ClipboardButton="secret_key">
131 <span class="form-text text-muted"
132 *ngIf="formGroup.showError('secret_key', frm, 'required')"
133 i18n>This field is required.</span>
138 <div class="modal-footer">
139 <cd-submit-button *ngIf="!viewing"
140 (submitAction)="onSubmit()"
141 i18n="form action button|Example: Create Pool@@formActionButton"
142 [form]="formGroup">{{ action | titlecase }} {{ resource | upperFirst }}</cd-submit-button>
143 <cd-back-button [back]="bsModalRef.hide"></cd-back-button>