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 <label class="cd-col-form-label"
21 <div class="cd-col-form-input">
31 <div class="form-group row">
32 <label class="cd-col-form-label"
34 <ng-container i18n>Subuser</ng-container>
35 <span class="required"
39 <div class="cd-col-form-input">
43 formControlName="subuid"
46 <span class="invalid-feedback"
47 *ngIf="formGroup.showError('subuid', frm, 'required')"
48 i18n>This field is required.</span>
49 <span class="invalid-feedback"
50 *ngIf="formGroup.showError('subuid', frm, 'subuserIdExists')"
51 i18n>The chosen subuser ID is already in use.</span>
56 <div class="form-group row">
57 <label class="cd-col-form-label"
59 <ng-container i18n>Permission</ng-container>
60 <span class="required"></span>
62 <div class="cd-col-form-input">
64 class="form-control custom-select"
65 formControlName="perm">
67 [ngValue]="null">-- Select a permission --</option>
68 <option *ngFor="let perm of ['read', 'write']"
73 value="read-write">read, write</option>
75 value="full-control">full</option>
77 <span class="invalid-feedback"
78 *ngIf="formGroup.showError('perm', frm, 'required')"
79 i18n>This field is required.</span>
84 <fieldset *ngIf="!editing">
85 <legend i18n>Swift key</legend>
87 <!-- Auto-generate key -->
88 <div class="form-group row">
89 <div class="cd-col-form-offset">
90 <div class="custom-control custom-checkbox">
91 <input class="custom-control-input"
94 formControlName="generate_secret">
95 <label class="custom-control-label"
97 i18n>Auto-generate secret</label>
103 <div class="form-group row"
104 *ngIf="!editing && !formGroup.getValue('generate_secret')">
105 <label class="cd-col-form-label"
107 <ng-container i18n>Secret key</ng-container>
108 <span class="required"></span>
110 <div class="cd-col-form-input">
111 <div class="input-group">
112 <input id="secret_key"
115 formControlName="secret_key">
116 <span class="input-group-append">
117 <button type="button"
118 class="btn btn-light"
119 cdPasswordButton="secret_key">
121 <button type="button"
122 class="btn btn-light"
123 cdCopy2ClipboardButton="secret_key">
127 <span class="invalid-feedback"
128 *ngIf="formGroup.showError('secret_key', frm, 'required')"
129 i18n>This field is required.</span>
136 <div class="modal-footer">
137 <cd-submit-button (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>