1 <div class=
"modal-header">
2 <h4 i18n=
"form title|Example: Create Pool@@formTitle"
3 class=
"modal-title pull-left">{{ action | titlecase }} {{ resource | upperFirst }}
</h4>
5 class=
"close pull-right"
7 (click)=
"bsModalRef.hide()">
8 <span aria-hidden=
"true">×</span>
11 <form class=
"form-horizontal"
13 [formGroup]=
"formGroup"
15 <div class=
"modal-body">
18 <div class=
"form-group"
19 [ngClass]=
"{'has-error': formGroup.showError('uid', frm)}">
20 <label class=
"control-label col-sm-3"
23 <div class=
"col-sm-9">
33 <div class=
"form-group"
34 [ngClass]=
"{'has-error': formGroup.showError('subuid', frm)}">
35 <label class=
"control-label col-sm-3"
37 <ng-container i18n
>Subuser
</ng-container>
38 <span class=
"required"
42 <div class=
"col-sm-9">
46 formControlName=
"subuid"
49 <span class=
"help-block"
50 *
ngIf=
"formGroup.showError('subuid', frm, 'required')"
51 i18n
>This field is required.
</span>
52 <span class=
"help-block"
53 *
ngIf=
"formGroup.showError('subuid', frm, 'subuserIdExists')"
54 i18n
>The chosen subuser ID is already in use.
</span>
59 <div class=
"form-group"
60 [ngClass]=
"{'has-error': formGroup.showError('perm', frm)}">
61 <label class=
"control-label col-sm-3"
63 <ng-container i18n
>Permission
</ng-container>
64 <span class=
"required"></span>
66 <div class=
"col-sm-9">
69 formControlName=
"perm">
71 [ngValue]=
"null">-- Select a permission --
</option>
72 <option *
ngFor=
"let perm of ['read', 'write']"
77 value=
"read-write">read, write
</option>
79 value=
"full-control">full
</option>
81 <span class=
"help-block"
82 *
ngIf=
"formGroup.showError('perm', frm, 'required')"
83 i18n
>This field is required.
</span>
88 <fieldset *
ngIf=
"!editing">
89 <legend i18n
>Swift key
</legend>
91 <!-- Auto-generate key -->
92 <div class=
"form-group">
93 <div class=
"col-sm-offset-3 col-sm-9">
94 <div class=
"checkbox checkbox-primary">
95 <input id=
"generate_secret"
97 formControlName=
"generate_secret">
98 <label for=
"generate_secret"
99 i18n
>Auto-generate secret
</label>
105 <div class=
"form-group"
106 [ngClass]=
"{'has-error': formGroup.showError('secret_key', frm)}"
107 *
ngIf=
"!editing && !formGroup.getValue('generate_secret')">
108 <label class=
"control-label col-sm-3"
110 <ng-container i18n
>Secret key
</ng-container>
111 <span class=
"required"></span>
113 <div class=
"col-sm-9">
114 <div class=
"input-group">
115 <input id=
"secret_key"
118 formControlName=
"secret_key">
119 <span class=
"input-group-btn">
120 <button type=
"button"
121 class=
"btn btn-default"
122 cdPasswordButton=
"secret_key">
124 <button type=
"button"
125 class=
"btn btn-default"
126 cdCopy2ClipboardButton=
"secret_key">
130 <span class=
"help-block"
131 *
ngIf=
"formGroup.showError('secret_key', frm, 'required')"
132 i18n
>This field is required.
</span>
139 <div class=
"modal-footer">
141 (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>