1 <div class="modal-header">
2 <h4 class="modal-title pull-left"
6 class="close pull-right"
8 (click)="bsModalRef.hide()">
9 <span aria-hidden="true">×</span>
12 <form class="form-horizontal"
14 [formGroup]="formGroup"
16 <div class="modal-body">
19 <div class="form-group"
20 [ngClass]="{'has-error': formGroup.showError('uid', frm)}">
21 <label class="control-label col-sm-3"
25 <div class="col-sm-9">
35 <div class="form-group"
36 [ngClass]="{'has-error': formGroup.showError('subuid', frm)}">
37 <label class="control-label col-sm-3"
39 <ng-container i18n>Subuser</ng-container>
40 <span class="required"
44 <div class="col-sm-9">
48 formControlName="subuid"
51 <span class="help-block"
52 *ngIf="formGroup.showError('subuid', frm, 'required')"
54 This field is required.
56 <span class="help-block"
57 *ngIf="formGroup.showError('subuid', frm, 'subuserIdExists')"
59 The chosen subuser ID is already in use.
65 <div class="form-group"
66 [ngClass]="{'has-error': formGroup.showError('perm', frm)}">
67 <label class="control-label col-sm-3"
69 <ng-container i18n>Permission</ng-container>
70 <span class="required"></span>
72 <div class="col-sm-9">
75 formControlName="perm">
78 -- Select a permission --
80 <option *ngFor="let perm of ['read', 'write']"
93 <span class="help-block"
94 *ngIf="formGroup.showError('perm', frm, 'required')"
96 This field is required.
102 <fieldset *ngIf="!editing">
103 <legend i18n>Swift key</legend>
105 <!-- Auto-generate key -->
106 <div class="form-group">
107 <div class="col-sm-offset-3 col-sm-9">
108 <div class="checkbox checkbox-primary">
109 <input id="generate_secret"
111 formControlName="generate_secret">
112 <label for="generate_secret"
113 i18n>Auto-generate secret
120 <div class="form-group"
121 [ngClass]="{'has-error': formGroup.showError('secret_key', frm)}"
122 *ngIf="!editing && !formGroup.getValue('generate_secret')">
123 <label class="control-label col-sm-3"
125 <ng-container i18n>Secret key</ng-container>
126 <span class="required"></span>
128 <div class="col-sm-9">
129 <div class="input-group">
130 <input id="secret_key"
133 formControlName="secret_key">
134 <span class="input-group-btn">
135 <button type="button"
136 class="btn btn-default"
137 cdPasswordButton="secret_key">
139 <button type="button"
140 class="btn btn-default"
141 cdCopy2ClipboardButton="secret_key">
145 <span class="help-block"
146 *ngIf="formGroup.showError('secret_key', frm, 'required')"
148 This field is required.
156 <div class="modal-footer">
157 <cd-submit-button (submitAction)="onSubmit()"
159 <ng-container i18n>{editing, select, 1 {Update} other {Add}}</ng-container>
161 <button class="btn btn-sm btn-default"
163 (click)="bsModalRef.hide()"