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>
5 class="close float-right"
7 (click)="bsModalRef.hide()">
8 <span aria-hidden="true">×</span>
12 [formGroup]="formGroup"
14 <div class="modal-body">
17 <div class="form-group row"
18 [ngClass]="{':invalid': formGroup.showError('uid', frm)}">
19 <label class="col-form-label col-sm-3"
22 <div class="col-sm-9">
32 <div class="form-group row"
33 [ngClass]="{':invalid': formGroup.showError('subuid', frm)}">
34 <label class="col-form-label col-sm-3"
36 <ng-container i18n>Subuser</ng-container>
37 <span class="required"
41 <div class="col-sm-9">
45 formControlName="subuid"
48 <span class="form-text text-muted"
49 *ngIf="formGroup.showError('subuid', frm, 'required')"
50 i18n>This field is required.</span>
51 <span class="form-text text-muted"
52 *ngIf="formGroup.showError('subuid', frm, 'subuserIdExists')"
53 i18n>The chosen subuser ID is already in use.</span>
58 <div class="form-group row"
59 [ngClass]="{':invalid': formGroup.showError('perm', frm)}">
60 <label class="col-form-label col-sm-3"
62 <ng-container i18n>Permission</ng-container>
63 <span class="required"></span>
65 <div class="col-sm-9">
68 formControlName="perm">
70 [ngValue]="null">-- Select a permission --</option>
71 <option *ngFor="let perm of ['read', 'write']"
76 value="read-write">read, write</option>
78 value="full-control">full</option>
80 <span class="form-text text-muted"
81 *ngIf="formGroup.showError('perm', frm, 'required')"
82 i18n>This field is required.</span>
87 <fieldset *ngIf="!editing">
88 <legend i18n>Swift key</legend>
90 <!-- Auto-generate key -->
91 <div class="form-group row">
92 <div class="offset-sm-3 col-sm-9">
93 <div class="custom-control custom-checkbox">
94 <input class="custom-control-input"
97 formControlName="generate_secret">
98 <label class="custom-control-label"
100 i18n>Auto-generate secret</label>
106 <div class="form-group row"
107 [ngClass]="{':invalid': formGroup.showError('secret_key', frm)}"
108 *ngIf="!editing && !formGroup.getValue('generate_secret')">
109 <label class="col-form-label col-sm-3"
111 <ng-container i18n>Secret key</ng-container>
112 <span class="required"></span>
114 <div class="col-sm-9">
115 <div class="input-group">
116 <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>
140 <div class="modal-footer">
141 <cd-submit-button (submitAction)="onSubmit()"
142 i18n="form action button|Example: Create Pool@@formActionButton"
143 [form]="formGroup">{{ action | titlecase }} {{ resource | upperFirst }}</cd-submit-button>
144 <cd-back-button [back]="bsModalRef.hide"></cd-back-button>