1 <div class=
"cd-col-form"
2 *
cdFormLoading=
"loading">
3 <form name=
"bucketForm"
5 [formGroup]=
"bucketForm"
8 <div i18n=
"form title|Example: Create Pool@@formTitle"
9 class=
"card-header">{{ action | titlecase }} {{ resource | upperFirst }}
</div>
11 <div class=
"card-body">
13 <div class=
"form-group row"
16 class=
"cd-col-form-label"
18 <div class=
"cd-col-form-input">
29 <div class=
"form-group row">
30 <label class=
"cd-col-form-label"
31 [ngClass]=
"{required: !editing}"
34 <div class=
"cd-col-form-input">
43 [autofocus]=
"!editing">
44 <span class=
"invalid-feedback"
45 *
ngIf=
"bucketForm.showError('bid', frm, 'required')"
46 i18n
>This field is required.
</span>
47 <span class=
"invalid-feedback"
48 *
ngIf=
"bucketForm.showError('bid', frm, 'bucketNameInvalid')"
49 i18n
>The value is not valid.
</span>
50 <span class=
"invalid-feedback"
51 *
ngIf=
"bucketForm.showError('bid', frm, 'bucketNameExists')"
52 i18n
>The chosen name is already in use.
</span>
57 <div class=
"form-group row">
58 <label class=
"cd-col-form-label required"
61 <div class=
"cd-col-form-input">
64 class=
"form-control custom-select"
65 formControlName=
"owner"
66 [autofocus]=
"editing">
68 *
ngIf=
"owners === null"
69 [ngValue]=
"null">Loading...
</option>
71 *
ngIf=
"owners !== null"
72 [ngValue]=
"null">-- Select a user --
</option>
73 <option *
ngFor=
"let owner of owners"
74 [value]=
"owner">{{ owner }}
</option>
76 <span class=
"invalid-feedback"
77 *
ngIf=
"bucketForm.showError('owner', frm, 'required')"
78 i18n
>This field is required.
</span>
82 <!-- Placement target -->
83 <div class=
"form-group row">
84 <label class=
"cd-col-form-label"
85 [ngClass]=
"{required: !editing}"
86 for=
"placement-target"
87 i18n
>Placement target
</label>
88 <div class=
"cd-col-form-input">
89 <ng-template #placementTargetSelect
>
90 <select id=
"placement-target"
91 name=
"placement-target"
92 formControlName=
"placement-target"
93 class=
"form-control custom-select">
95 *
ngIf=
"placementTargets === null"
96 [ngValue]=
"null">Loading...
</option>
98 *
ngIf=
"placementTargets !== null"
99 [ngValue]=
"null">-- Select a placement target --
</option>
100 <option *
ngFor=
"let placementTarget of placementTargets"
101 [value]=
"placementTarget.name">{{ placementTarget.description }}
</option>
103 <span class=
"invalid-feedback"
104 *
ngIf=
"bucketForm.showError('placement-target', frm, 'required')"
105 i18n
>This field is required.
</span>
107 <ng-container *
ngIf=
"editing; else placementTargetSelect">
108 <input id=
"placement-target"
109 name=
"placement-target"
110 formControlName=
"placement-target"
119 <fieldset *
ngIf=
"editing">
120 <legend class=
"cd-header"
121 i18n
>Versioning
</legend>
123 <div class=
"form-group row">
124 <div class=
"cd-col-form-offset">
125 <div class=
"custom-control custom-checkbox">
126 <input type=
"checkbox"
127 class=
"custom-control-input"
130 formControlName=
"versioning"
131 (change)=
"setMfaDeleteValidators()">
132 <label class=
"custom-control-label"
136 <span i18n
>Enables versioning for the objects in the bucket.
</span>
143 <!-- Multi-Factor Authentication -->
144 <fieldset *
ngIf=
"editing">
146 <legend class=
"cd-header"
147 i18n
>Multi-Factor Authentication
</legend>
149 <div class=
"form-group row">
150 <div class=
"cd-col-form-offset">
151 <div class=
"custom-control custom-checkbox">
152 <input type=
"checkbox"
153 class=
"custom-control-input"
156 formControlName=
"mfa-delete"
157 (change)=
"setMfaDeleteValidators()">
158 <label class=
"custom-control-label"
160 i18n
>Delete enabled
</label>
162 <span i18n
>Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.
</span>
167 <div *
ngIf=
"areMfaCredentialsRequired()"
168 class=
"form-group row">
170 class=
"cd-col-form-label"
171 for=
"mfa-token-serial">Token Serial Number
</label>
172 <div class=
"cd-col-form-input">
174 id=
"mfa-token-serial"
175 name=
"mfa-token-serial"
176 formControlName=
"mfa-token-serial"
177 class=
"form-control">
178 <span class=
"invalid-feedback"
179 *
ngIf=
"bucketForm.showError('mfa-token-serial', frm, 'required')"
180 i18n
>This field is required.
</span>
183 <div *
ngIf=
"areMfaCredentialsRequired()"
184 class=
"form-group row">
186 class=
"cd-col-form-label"
187 for=
"mfa-token-pin">Token PIN
</label>
188 <div class=
"cd-col-form-input">
192 formControlName=
"mfa-token-pin"
193 class=
"form-control">
194 <span class=
"invalid-feedback"
195 *
ngIf=
"bucketForm.showError('mfa-token-pin', frm, 'required')"
196 i18n
>This field is required.
</span>
203 <legend class=
"cd-header"
204 i18n
>Locking
</legend>
206 <!-- Locking enabled -->
207 <div class=
"form-group row">
208 <div class=
"cd-col-form-offset">
209 <div class=
"custom-control custom-checkbox">
210 <input class=
"custom-control-input"
212 formControlName=
"lock_enabled"
214 <label class=
"custom-control-label"
218 <span i18n
>Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.
</span>
224 <!-- Locking mode -->
225 <div *
ngIf=
"bucketForm.getValue('lock_enabled')"
226 class=
"form-group row">
227 <label class=
"cd-col-form-label"
230 <div class=
"cd-col-form-input">
231 <select class=
"form-control custom-select"
232 formControlName=
"lock_mode"
236 value=
"COMPLIANCE">Compliance
</option>
238 value=
"GOVERNANCE">Governance
</option>
243 <!-- Retention period (days) -->
244 <div *
ngIf=
"bucketForm.getValue('lock_enabled')"
245 class=
"form-group row">
246 <label class=
"cd-col-form-label"
247 for=
"lock_retention_period_days">
248 <ng-container i18n
>Days
</ng-container>
249 <cd-helper i18n
>The number of days that you want to specify for the default retention period that will be applied to new objects placed in this bucket.
</cd-helper>
251 <div class=
"cd-col-form-input">
252 <input class=
"form-control"
254 id=
"lock_retention_period_days"
255 formControlName=
"lock_retention_period_days"
257 <span class=
"invalid-feedback"
258 *
ngIf=
"bucketForm.showError('lock_retention_period_days', frm, 'pattern')"
259 i18n
>The entered value must be a positive integer.
</span>
260 <span class=
"invalid-feedback"
261 *
ngIf=
"bucketForm.showError('lock_retention_period_days', frm, 'eitherDaysOrYears')"
262 i18n
>Retention period requires either Days or Years.
</span>
266 <!-- Retention period (years) -->
267 <div *
ngIf=
"bucketForm.getValue('lock_enabled')"
268 class=
"form-group row">
269 <label class=
"cd-col-form-label"
270 for=
"lock_retention_period_years">
271 <ng-container i18n
>Years
</ng-container>
272 <cd-helper i18n
>The number of years that you want to specify for the default retention period that will be applied to new objects placed in this bucket.
</cd-helper>
274 <div class=
"cd-col-form-input">
275 <input class=
"form-control"
277 id=
"lock_retention_period_years"
278 formControlName=
"lock_retention_period_years"
280 <span class=
"invalid-feedback"
281 *
ngIf=
"bucketForm.showError('lock_retention_period_days', frm, 'pattern')"
282 i18n
>The entered value must be a positive integer.
</span>
283 <span class=
"invalid-feedback"
284 *
ngIf=
"bucketForm.showError('lock_retention_period_years', frm, 'eitherDaysOrYears')"
285 i18n
>Retention period requires either Days or Years.
</span>
291 <div class=
"card-footer">
292 <cd-form-button-panel (submitActionEvent)=
"submit()"
294 [submitText]=
"(action | titlecase) + ' ' + (resource | upperFirst)"
295 wrappingClass=
"text-right"></cd-form-button-panel>