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 <label class="col-form-label col-sm-3"
21 <ng-container i18n>Username</ng-container>
22 <span class="required"
26 <div class="col-sm-9">
32 formControlName="user">
35 formControlName="user"
39 *ngIf="userCandidates !== null"
40 [ngValue]="null">-- Select a username --</option>
41 <option *ngFor="let userCandidate of userCandidates"
42 [value]="userCandidate">{{ userCandidate }}</option>
44 <span class="invalid-feedback"
45 *ngIf="formGroup.showError('user', frm, 'required')"
46 i18n>This field is required.</span>
50 <!-- Auto-generate key -->
51 <div class="form-group row"
53 <div class="offset-sm-3 col-sm-9">
54 <div class="custom-control custom-checkbox">
55 <input class="custom-control-input"
58 formControlName="generate_key">
59 <label class="custom-control-label"
61 i18n>Auto-generate key</label>
67 <div class="form-group row"
68 *ngIf="!formGroup.getValue('generate_key')">
69 <label class="col-form-label col-sm-3"
71 <ng-container i18n>Access key</ng-container>
72 <span class="required"
76 <div class="col-sm-9">
77 <div class="input-group">
78 <input id="access_key"
82 formControlName="access_key">
83 <span class="input-group-append">
86 cdPasswordButton="access_key">
90 cdCopy2ClipboardButton="access_key">
94 <span class="invalid-feedback"
95 *ngIf="formGroup.showError('access_key', frm, 'required')"
96 i18n>This field is required.</span>
101 <div class="form-group row"
102 *ngIf="!formGroup.getValue('generate_key')">
103 <label class="col-form-label col-sm-3"
105 <ng-container i18n>Secret key</ng-container>
106 <span class="required"
110 <div class="col-sm-9">
111 <div class="input-group">
112 <input id="secret_key"
116 formControlName="secret_key">
117 <span class="input-group-append">
118 <button type="button"
119 class="btn btn-light"
120 cdPasswordButton="secret_key">
122 <button type="button"
123 class="btn btn-light"
124 cdCopy2ClipboardButton="secret_key">
128 <span class="invalid-feedback"
129 *ngIf="formGroup.showError('secret_key', frm, 'required')"
130 i18n>This field is required.</span>
135 <div class="modal-footer">
136 <cd-submit-button *ngIf="!viewing"
137 (submitAction)="onSubmit()"
138 i18n="form action button|Example: Create Pool@@formActionButton"
139 [form]="formGroup">{{ action | titlecase }} {{ resource | upperFirst }}</cd-submit-button>
140 <cd-back-button [back]="bsModalRef.hide"></cd-back-button>