@schukai/monster 3.116.1 → 3.117.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/source/components/form/login.mjs +1428 -1420
@@ -10,22 +10,21 @@
|
|
10
10
|
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
11
11
|
*/
|
12
12
|
|
13
|
-
import {
|
14
|
-
import {
|
13
|
+
import {instanceSymbol} from "../../constants.mjs";
|
14
|
+
import {addAttributeToken} from "../../dom/attributes.mjs";
|
15
15
|
import {
|
16
|
-
|
17
|
-
|
16
|
+
ATTRIBUTE_ERRORMESSAGE,
|
17
|
+
ATTRIBUTE_ROLE,
|
18
18
|
} from "../../dom/constants.mjs";
|
19
|
-
import {
|
20
|
-
import { CustomElement } from "../../dom/customelement.mjs";
|
19
|
+
import {CustomElement} from "../../dom/customelement.mjs";
|
21
20
|
import {
|
22
|
-
|
23
|
-
|
21
|
+
assembleMethodSymbol,
|
22
|
+
registerCustomElement,
|
24
23
|
} from "../../dom/customelement.mjs";
|
25
|
-
import {
|
26
|
-
import {
|
27
|
-
import {
|
28
|
-
import {
|
24
|
+
import {findTargetElementFromEvent, fireEvent} from "../../dom/events.mjs";
|
25
|
+
import {isFunction} from "../../types/is.mjs";
|
26
|
+
import {LoginStyleSheet} from "./stylesheet/login.mjs";
|
27
|
+
import {fireCustomEvent} from "../../dom/events.mjs";
|
29
28
|
|
30
29
|
import "./form.mjs";
|
31
30
|
import "./field-set.mjs";
|
@@ -35,11 +34,11 @@ import "./digits.mjs";
|
|
35
34
|
import "../layout/collapse.mjs";
|
36
35
|
import "../datatable/datasource/rest.mjs";
|
37
36
|
|
38
|
-
import {
|
39
|
-
import {
|
40
|
-
import {
|
37
|
+
import {InvalidStyleSheet} from "./stylesheet/invalid.mjs";
|
38
|
+
import {getLocaleOfDocument} from "../../dom/locale.mjs";
|
39
|
+
import {getWindow} from "../../dom/util.mjs";
|
41
40
|
|
42
|
-
export {
|
41
|
+
export {Login};
|
43
42
|
|
44
43
|
/**
|
45
44
|
* @private
|
@@ -129,858 +128,867 @@ const digitsCollapseSymbol = Symbol("digitsCollapse");
|
|
129
128
|
* @since 3.113.0
|
130
129
|
* @copyright schukai GmbH
|
131
130
|
* @summary A beautiful Login that can make your life easier and also looks good. It supports a lot of features.
|
131
|
+
*
|
132
|
+
* @fires login-success
|
133
|
+
* @fires redirect-to-first-success-url
|
132
134
|
*/
|
133
135
|
class Login extends CustomElement {
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
136
|
+
/**
|
137
|
+
* This method is called by the `instanceof` operator.
|
138
|
+
* @returns {symbol}
|
139
|
+
*/
|
140
|
+
static get [instanceSymbol]() {
|
141
|
+
return Symbol.for("@schukai/monster/components/form/login@@instance");
|
142
|
+
}
|
143
|
+
|
144
|
+
/**
|
145
|
+
*
|
146
|
+
* @return {Components.Form.Login
|
147
|
+
*/
|
148
|
+
[assembleMethodSymbol]() {
|
149
|
+
super[assembleMethodSymbol]();
|
150
|
+
|
151
|
+
setTimeout(() => {
|
152
|
+
initControlReferences.call(this);
|
153
|
+
initEventHandler.call(this);
|
154
|
+
|
155
|
+
setTimeout(() => {
|
156
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
157
|
+
}, 100);
|
158
|
+
}, 0);
|
159
|
+
return this;
|
160
|
+
}
|
161
|
+
|
162
|
+
/**
|
163
|
+
* To set the options via the HTML Tag, the attribute `data-monster-options` must be used.
|
164
|
+
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
165
|
+
*
|
166
|
+
* The individual configuration values can be found in the table.
|
167
|
+
*
|
168
|
+
* @property {Object} templates Template definitions
|
169
|
+
* @property {string} templates.main Main template
|
170
|
+
* @property {Object} labels Label definitions
|
171
|
+
* @property {Object} classes Class definitions
|
172
|
+
* @property {string} classes.usernameInvalid Class for invalid
|
173
|
+
* @property {string} classes.passwordInvalid Class for invalid
|
174
|
+
* @property {string} classes.emailInvalid Class for invalid
|
175
|
+
* @property {boolean} disabled Disabled
|
176
|
+
* @property {Object} features Feature definitions
|
177
|
+
* @property {boolean} features.forgotPassword Forgot Password enabled
|
178
|
+
* @property {boolean} features.redirectToFirstSuccessUrl Redirect to first success URL
|
179
|
+
* @property {Object} actions Action definitions
|
180
|
+
* @property {number} digits Digits
|
181
|
+
* @property {Object[]} successUrls Success URLs
|
182
|
+
* @property {string} successUrls.label Label
|
183
|
+
* @property {string} successUrls.url URL
|
184
|
+
* @property {number} timeoutForMessage Timeout for message
|
185
|
+
* @property {number} timeoutForSuccess Timeout for success
|
186
|
+
* @property {Object} accessKeys Access keys
|
187
|
+
* @property {string} accessKeys.loginLink Login link
|
188
|
+
* @property {string} accessKeys.username Username
|
189
|
+
* @property {string} accessKeys.password Password
|
190
|
+
* @property {Object} fetch Fetch definitions
|
191
|
+
* @property {Object} fetch.login Login fetch
|
192
|
+
* @property {string} fetch.login.url URL
|
193
|
+
* @property {string} fetch.login.method Method
|
194
|
+
* @property {string} fetch.login.mode Mode
|
195
|
+
* @property {Object} fetch.login.headers Headers
|
196
|
+
* @property {string} fetch.login.headers.accept Accept
|
197
|
+
* @property {string} fetch.login.credentials Credentials
|
198
|
+
* @property {Object} fetch.forgotPassword Forgot Password fetch
|
199
|
+
* @property {string} fetch.forgotPassword.url URL
|
200
|
+
* @property {string} fetch.forgotPassword.method Method
|
201
|
+
* @property {string} fetch.forgotPassword.mode Mode
|
202
|
+
* @property {Object} fetch.forgotPassword.headers Headers
|
203
|
+
* @property {string} fetch.forgotPassword.headers.accept Accept
|
204
|
+
* @property {string} fetch.forgotPassword.credentials Credentials
|
205
|
+
* @property {Object} fetch.digits Digits fetch
|
206
|
+
* @property {string} fetch.digits.url URL
|
207
|
+
* @property {string} fetch.digits.method Method
|
208
|
+
* @property {string} fetch.digits.mode Mode
|
209
|
+
* @property {Object} fetch.digits.headers Headers
|
210
|
+
* @property {string} fetch.digits.headers.accept Accept
|
211
|
+
* @property {string} fetch.digits.credentials Credentials
|
212
|
+
* @property {Object} fetch.secondFactor Second Factor fetch
|
213
|
+
* @property {string} fetch.secondFactor.url URL
|
214
|
+
* @property {string} fetch.secondFactor.method Method
|
215
|
+
* @property {string} fetch.secondFactor.mode Mode
|
216
|
+
* @property {Object} fetch.secondFactor.headers Headers
|
217
|
+
* @property {string} fetch.secondFactor.headers.accept Accept
|
218
|
+
* @property {string} fetch.secondFactor.credentials Credentials
|
219
|
+
*/
|
220
|
+
get defaults() {
|
221
|
+
return Object.assign({}, super.defaults, {
|
222
|
+
templates: {
|
223
|
+
main: getTemplate(),
|
224
|
+
},
|
225
|
+
labels: getTranslations(),
|
226
|
+
classes: {
|
227
|
+
usernameInvalid: "",
|
228
|
+
passwordInvalid: "",
|
229
|
+
emailInvalid: "",
|
230
|
+
},
|
231
|
+
disabled: false,
|
232
|
+
features: {
|
233
|
+
forgotPassword: true,
|
234
|
+
redirectToFirstSuccessUrl: false,
|
235
|
+
},
|
236
|
+
actions: {},
|
237
|
+
|
238
|
+
digits: 6,
|
239
|
+
|
240
|
+
successUrls: [
|
241
|
+
{
|
242
|
+
label: "Home",
|
243
|
+
url: "/",
|
244
|
+
},
|
245
|
+
{
|
246
|
+
label: "Logout",
|
247
|
+
url: "/logout",
|
248
|
+
},
|
249
|
+
],
|
250
|
+
|
251
|
+
timeoutForMessage: 3500,
|
252
|
+
timeoutForSuccess: 1000,
|
253
|
+
|
254
|
+
accessKeys: {
|
255
|
+
loginLink: "x",
|
256
|
+
username: "u",
|
257
|
+
password: "p",
|
258
|
+
},
|
259
|
+
|
260
|
+
fetch: {
|
261
|
+
login: {
|
262
|
+
url: "",
|
263
|
+
method: "POST",
|
264
|
+
mode: "same-origin",
|
265
|
+
headers: {
|
266
|
+
Accept: "application/json",
|
267
|
+
"Content-Type": "application/json; charset=utf-8",
|
268
|
+
},
|
269
|
+
credentials: "same-origin",
|
270
|
+
},
|
271
|
+
forgotPassword: {
|
272
|
+
url: "",
|
273
|
+
method: "POST",
|
274
|
+
mode: "same-origin",
|
275
|
+
headers: {
|
276
|
+
Accept: "application/json",
|
277
|
+
"Content-Type": "application/json; charset=utf-8",
|
278
|
+
},
|
279
|
+
credentials: "same-origin",
|
280
|
+
},
|
281
|
+
digits: {
|
282
|
+
url: "",
|
283
|
+
method: "POST",
|
284
|
+
mode: "same-origin",
|
285
|
+
headers: {
|
286
|
+
Accept: "application/json",
|
287
|
+
"Content-Type": "application/json; charset=utf-8",
|
288
|
+
},
|
289
|
+
credentials: "same-origin",
|
290
|
+
},
|
291
|
+
secondFactor: {
|
292
|
+
url: "",
|
293
|
+
method: "POST",
|
294
|
+
mode: "same-origin",
|
295
|
+
headers: {
|
296
|
+
Accept: "application/json",
|
297
|
+
"Content-Type": "application/json; charset=utf-8",
|
298
|
+
},
|
299
|
+
credentials: "same-origin",
|
300
|
+
},
|
301
|
+
},
|
302
|
+
});
|
303
|
+
}
|
304
|
+
|
305
|
+
/**
|
306
|
+
* Opens the login collapse and focuses the username control.
|
307
|
+
*
|
308
|
+
* @returns {Login}
|
309
|
+
*/
|
310
|
+
openLogin() {
|
311
|
+
this[loginCollapseSymbol].open();
|
312
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
313
|
+
return this;
|
314
|
+
}
|
315
|
+
|
316
|
+
/**
|
317
|
+
* Opens the forgot password collapse. If the feature `forgotPassword` is not enabled, an error will be thrown.
|
318
|
+
*
|
319
|
+
* @returns {Login}
|
320
|
+
* @throws {Error} If the feature is not enabled
|
321
|
+
*/
|
322
|
+
openForgotPassword() {
|
323
|
+
if (!this.getOption("features.forgotPassword")) {
|
324
|
+
throw new Error("Forgot Password is not enabled");
|
325
|
+
}
|
326
|
+
|
327
|
+
this[forgotPasswordCollapseSymbol].open();
|
328
|
+
return this;
|
329
|
+
}
|
330
|
+
|
331
|
+
/**
|
332
|
+
* Opens the second factor collapse and focuses the second factor control.
|
333
|
+
* @returns {Login}
|
334
|
+
*/
|
335
|
+
openSecondFactor() {
|
336
|
+
this[secondFactorCollapseSymbol].open();
|
337
|
+
this.shadowRoot.getElementById("secondFactorButton").focus();
|
338
|
+
return this;
|
339
|
+
}
|
340
|
+
|
341
|
+
/**
|
342
|
+
* Opens the digits collapse and focuses the digits control.
|
343
|
+
* @returns {Login}
|
344
|
+
*/
|
345
|
+
openDigits() {
|
346
|
+
this[digitsCollapseSymbol].open();
|
347
|
+
this.shadowRoot.getElementById("digitsControl").focus();
|
348
|
+
return this;
|
349
|
+
}
|
350
|
+
|
351
|
+
/**
|
352
|
+
* Opens the logged in collapse. If the feature `redirectToFirstSuccessUrl` is enabled, the user will be redirected to the first success URL.
|
353
|
+
*
|
354
|
+
* @returns {Login}
|
355
|
+
*/
|
356
|
+
openLoggedIn() {
|
357
|
+
|
358
|
+
fireEvent(this, "login-success");
|
359
|
+
|
360
|
+
if (this.getOption("features.redirectToFirstSuccessUrl")) {
|
361
|
+
setTimeout(() => {
|
362
|
+
|
363
|
+
fireEvent(this, "redirect-to-first-success-url");
|
364
|
+
|
365
|
+
const successUrl = this.getOption("successUrls");
|
366
|
+
if (successUrl.length > 0) {
|
367
|
+
const success = successUrl[0].url;
|
368
|
+
if (success) {
|
369
|
+
getWindow().location.href = success;
|
370
|
+
}
|
371
|
+
}
|
372
|
+
}, this.getOption("timeoutForSuccess"));
|
373
|
+
|
374
|
+
return;
|
375
|
+
}
|
376
|
+
|
377
|
+
this[loggedInCollapseSymbol].open();
|
378
|
+
|
379
|
+
return this;
|
380
|
+
}
|
381
|
+
|
382
|
+
/**
|
383
|
+
* @return {string}
|
384
|
+
*/
|
385
|
+
static getTag() {
|
386
|
+
return "monster-login";
|
387
|
+
}
|
388
|
+
|
389
|
+
/**
|
390
|
+
* @return {CSSStyleSheet[]}
|
391
|
+
*/
|
392
|
+
static getCSSStyleSheet() {
|
393
|
+
return [LoginStyleSheet, InvalidStyleSheet];
|
394
|
+
}
|
387
395
|
}
|
388
396
|
|
389
397
|
function getTranslations() {
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
398
|
+
const locale = getLocaleOfDocument();
|
399
|
+
switch (locale.language) {
|
400
|
+
case "de":
|
401
|
+
return {
|
402
|
+
username: "Benutzername oder E-Mail",
|
403
|
+
password: "Passwort",
|
404
|
+
login: "Anmelden",
|
405
|
+
forgotPasswordLink: "Passwort vergessen?",
|
406
|
+
mailAddress: "E-Mail-Adresse",
|
407
|
+
requestLink: "Code anfordern",
|
408
|
+
digits: "Code",
|
409
|
+
loginLink: "Anmelden",
|
410
|
+
secondFactor: "Zweiter Faktor Code",
|
411
|
+
sendDigits: "Code senden",
|
412
|
+
sendSecondFactorDigits: "Code senden",
|
413
|
+
resetLoginProcess: "Zurück zum Login",
|
414
|
+
messageEmptyUserName: "Bitte geben Sie Ihren Benutzernamen ein",
|
415
|
+
messageEmptyPassword: "Bitte geben Sie Ihr Passwort ein",
|
416
|
+
messageEmptyBoth:
|
417
|
+
"Bitte geben Sie Ihren Benutzernamen und Ihr Passwort ein",
|
418
|
+
messageEmptyEmail: "Bitte geben Sie Ihre E-Mail-Adresse ein",
|
419
|
+
messageInvalidEmail: "Bitte geben Sie eine gültige E-Mail-Adresse ein",
|
420
|
+
digitsEmpty: "Bitte geben Sie Ihren Code ein",
|
421
|
+
digitsInvalid: "Bitte geben Sie einen gültigen Code ein",
|
422
|
+
messageLoginFailed:
|
423
|
+
"Anmeldung fehlgeschlagen, bitte überprüfen Sie Ihre Eingaben.",
|
424
|
+
messageForbidden:
|
425
|
+
"Die Anmeldung war erfolgreich, aber Sie haben keine Berechtigung. Sie können sich <b>nicht</b> anmelden.<br>Sie können einen anderen Benutzer auswählen oder sich an den Administrator wenden.",
|
426
|
+
messageSomethingWentWrong:
|
427
|
+
"Etwas ist schief gelaufen, bitte versuchen Sie es später erneut",
|
428
|
+
messageThisFormIsNotConfigured:
|
429
|
+
"Dieses Formular ist nicht konfiguriert.",
|
430
|
+
messagePasswordResetDisabled:
|
431
|
+
"Sie können keinen Code anfordern, da die<br>Zwei-Faktor-Authentifizierung bei Ihrem Konto aktiviert ist.<br>Bitte kontaktieren Sie den Administrator.",
|
432
|
+
};
|
433
|
+
case "es":
|
434
|
+
return {
|
435
|
+
username: "Nombre de usuario o correo electrónico",
|
436
|
+
password: "Contraseña",
|
437
|
+
login: "Iniciar sesión",
|
438
|
+
forgotPasswordLink: "¿Olvidaste tu contraseña?",
|
439
|
+
mailAddress: "Dirección de correo electrónico",
|
440
|
+
requestLink: "Solicitar enlace",
|
441
|
+
digits: "Código",
|
442
|
+
loginLink: "Iniciar sesión",
|
443
|
+
secondFactor: "Código de segundo factor",
|
444
|
+
sendDigits: "Enviar código",
|
445
|
+
sendSecondFactorDigits: "Enviar código",
|
446
|
+
resetLoginProcess: "Volver al inicio de sesión",
|
447
|
+
messageEmptyUserName: "Por favor ingrese su nombre de usuario",
|
448
|
+
messageEmptyPassword: "Por favor ingrese su contraseña",
|
449
|
+
messageEmptyBoth: "Por favor ingrese su nombre de usuario y contraseña",
|
450
|
+
messageEmptyEmail:
|
451
|
+
"Por favor ingrese su dirección de correo electrónico",
|
452
|
+
messageInvalidEmail:
|
453
|
+
"Por favor ingrese una dirección de correo electrónico válida",
|
454
|
+
digitsEmpty: "Por favor ingrese su código",
|
455
|
+
digitsInvalid: "Por favor ingrese un código válido",
|
456
|
+
messageLoginFailed:
|
457
|
+
"Error al iniciar sesión, por favor verifique sus datos.",
|
458
|
+
messageForbidden:
|
459
|
+
"El inicio de sesión fue exitoso, pero no tienes permisos. <b>No puedes</b> iniciar sesión.<br>Puedes seleccionar otro usuario o contactar al administrador.",
|
460
|
+
messageSomethingWentWrong:
|
461
|
+
"Algo salió mal, por favor intenta de nuevo más tarde.",
|
462
|
+
messageThisFormIsNotConfigured: "Este formulario no está configurado.",
|
463
|
+
messagePasswordResetDisabled:
|
464
|
+
"Esta función no funciona porque la autenticación de dos factores está activada en su cuenta. Por favor, póngase en contacto con el administrador.",
|
465
|
+
};
|
466
|
+
case "zh":
|
467
|
+
return {
|
468
|
+
username: "用户名或电子邮箱",
|
469
|
+
password: "密码",
|
470
|
+
login: "登录",
|
471
|
+
forgotPasswordLink: "忘记密码?",
|
472
|
+
mailAddress: "电子邮件地址",
|
473
|
+
requestLink: "请求链接",
|
474
|
+
digits: "验证码",
|
475
|
+
loginLink: "登录",
|
476
|
+
secondFactor: "二次验证码",
|
477
|
+
sendDigits: "发送验证码",
|
478
|
+
sendSecondFactorDigits: "发送验证码",
|
479
|
+
resetLoginProcess: "返回登录",
|
480
|
+
messageEmptyUserName: "请输入用户名",
|
481
|
+
messageEmptyPassword: "请输入密码",
|
482
|
+
messageEmptyBoth: "请输入用户名和密码",
|
483
|
+
messageEmptyEmail: "请输入电子邮件地址",
|
484
|
+
messageInvalidEmail: "请输入有效的电子邮件地址",
|
485
|
+
digitsEmpty: "请输入验证码",
|
486
|
+
digitsInvalid: "请输入有效的验证码",
|
487
|
+
messageLoginFailed: "登录失败,请检查您的输入。",
|
488
|
+
messageForbidden:
|
489
|
+
"登录成功,但您没有权限。您<b>不能</b>登录。<br>您可以选择其他用户或联系管理员。",
|
490
|
+
messageSomethingWentWrong: "出了点问题,请稍后再试。",
|
491
|
+
messageThisFormIsNotConfigured: "此表单尚未配置。",
|
492
|
+
messagePasswordResetDisabled:
|
493
|
+
"此功能无法使用,因为您的帐户启用了双因素身份验证。请联系管理员。",
|
494
|
+
};
|
495
|
+
|
496
|
+
case "hi":
|
497
|
+
return {
|
498
|
+
username: "उपयगकर नम य ई-मल",
|
499
|
+
password: "पसवर",
|
500
|
+
login: "लग इन कर",
|
501
|
+
forgotPasswordLink: "पसवर भल गए?",
|
502
|
+
mailAddress: "ई-मल पत",
|
503
|
+
requestLink: "लक क अनरध कर",
|
504
|
+
digits: "कड",
|
505
|
+
loginLink: "लग इन कर",
|
506
|
+
secondFactor: "दसर फकर कड",
|
507
|
+
sendDigits: "कड भज",
|
508
|
+
sendSecondFactorDigits: "कड भज",
|
509
|
+
resetLoginProcess: "लगन पर वपस जए",
|
510
|
+
messageEmptyUserName: "कपय अपन उपयगकर नम दर कर",
|
511
|
+
messageEmptyPassword: "कपय अपन पसवर दर कर",
|
512
|
+
messageEmptyBoth: "कपय अपन उपयगकर नम और पसवर दर कर",
|
513
|
+
messageEmptyEmail: "कपय अपन ई-मल पत दर कर",
|
514
|
+
messageInvalidEmail: "कपय एक वध ई-मल पत दर कर",
|
515
|
+
digitsEmpty: "कपय अपन कड दर कर",
|
516
|
+
digitsInvalid: "कपय एक वध कड दर कर",
|
517
|
+
messageLoginFailed: "लगन वफल हआ, कपय अपन जनकर क जच कर।",
|
518
|
+
messageForbidden:
|
519
|
+
"लगन सफल रह लकन आपक पस अनमत नह ह। आप <b>लगन नह</b> कर सकत।<br>आप दसर उपयगकर चन सकत ह य पशसक स सपर कर सकत ह।",
|
520
|
+
messageSomethingWentWrong: "कछ गलत हआ, कपय बद म पन पयस कर।",
|
521
|
+
messageThisFormIsNotConfigured: "यह फर कनगर नह ह।",
|
522
|
+
messagePasswordResetDisabled:
|
523
|
+
"यह सवध कम नह करत कक आपक खत म द घटक पमणकरण सकम ह। कपय पशसक स सपर कर।",
|
524
|
+
};
|
525
|
+
|
526
|
+
case "bn":
|
527
|
+
return {
|
528
|
+
username: "ইউজরনম ব ই-মইল",
|
529
|
+
password: "পসওযর",
|
530
|
+
login: "লগইন করন",
|
531
|
+
forgotPasswordLink: "পসওযর ভল গছন?",
|
532
|
+
mailAddress: "ই-মইল ঠকন",
|
533
|
+
requestLink: "লক অনরধ করন",
|
534
|
+
digits: "কড",
|
535
|
+
loginLink: "লগইন করন",
|
536
|
+
secondFactor: "দতয ফকর কড",
|
537
|
+
sendDigits: "কড পঠন",
|
538
|
+
sendSecondFactorDigits: "কড পঠন",
|
539
|
+
resetLoginProcess: "লগইন ফর যন",
|
540
|
+
messageEmptyUserName: "দয কর আপনর ইউজরনম লখন",
|
541
|
+
messageEmptyPassword: "দয কর আপনর পসওযর লখন",
|
542
|
+
messageEmptyBoth: "দয কর আপনর ইউজরনম এব পসওযর লখন",
|
543
|
+
messageEmptyEmail: "দয কর আপনর ই-মইল ঠকন লখন",
|
544
|
+
messageInvalidEmail: "দয কর একট বধ ই-মইল ঠকন লখন",
|
545
|
+
digitsEmpty: "দয কর আপনর কড লখন",
|
546
|
+
digitsInvalid: "দয কর একট বধ কড লখন",
|
547
|
+
messageLoginFailed: "লগইন বর হযছ, দয কর আপনর ইনপট পরক করন।",
|
548
|
+
messageForbidden:
|
549
|
+
"লগইন সফল হযছ, কন আপনর অনমত নই। আপন <b>লগইন করত পরবন ন</b>।<br>আপন অন ইউজর নরচন করত পরন অথব অযডমনসটরর সথ যগযগ করত পরন।",
|
550
|
+
messageSomethingWentWrong: "কছ ভল হযছ, দয কর পর আবর চষ করন।",
|
551
|
+
messageThisFormIsNotConfigured: "এই ফরট কনফগর কর হযন।",
|
552
|
+
messagePasswordResetDisabled:
|
553
|
+
"এই ফশনট করকর নয করণ আপনর অযকউন দট ফকর পমণকরণ সকয কর আছ। দয কর পশসকর সথ যগযগ করন।",
|
554
|
+
};
|
555
|
+
|
556
|
+
case "pt": // Portuguese
|
557
|
+
return {
|
558
|
+
username: "Nome de usuário ou e-mail",
|
559
|
+
password: "Senha",
|
560
|
+
login: "Entrar",
|
561
|
+
forgotPasswordLink: "Esqueceu a senha?",
|
562
|
+
mailAddress: "Endereço de e-mail",
|
563
|
+
requestLink: "Solicitar link",
|
564
|
+
digits: "Código",
|
565
|
+
loginLink: "Entrar",
|
566
|
+
secondFactor: "Código do segundo fator",
|
567
|
+
sendDigits: "Enviar código",
|
568
|
+
sendSecondFactorDigits: "Enviar código",
|
569
|
+
resetLoginProcess: "Voltar ao login",
|
570
|
+
messageEmptyUserName: "Por favor, insira seu nome de usuário",
|
571
|
+
messageEmptyPassword: "Por favor, insira sua senha",
|
572
|
+
messageEmptyBoth: "Por favor, insira seu nome de usuário e senha",
|
573
|
+
messageEmptyEmail: "Por favor, insira seu endereço de e-mail",
|
574
|
+
messageInvalidEmail: "Por favor, insira um endereço de e-mail válido",
|
575
|
+
digitsEmpty: "Por favor, insira seu código",
|
576
|
+
digitsInvalid: "Por favor, insira um código válido",
|
577
|
+
messageLoginFailed: "Falha no login, verifique suas informações.",
|
578
|
+
messageForbidden:
|
579
|
+
"Login foi bem-sucedido, mas você não tem permissão. Você <b>não pode</b> entrar.<br>Você pode escolher outro usuário ou entrar em contato com o administrador.",
|
580
|
+
messageSomethingWentWrong:
|
581
|
+
"Algo deu errado, tente novamente mais tarde.",
|
582
|
+
messageThisFormIsNotConfigured: "Este formulário não está configurado.",
|
583
|
+
messagePasswordResetDisabled:
|
584
|
+
"Esta função não funciona porque a autenticação de dois fatores<br>está ativada em sua conta. Por favor, entre em contato com o administrador.",
|
585
|
+
};
|
586
|
+
|
587
|
+
case "ru": // Russian
|
588
|
+
return {
|
589
|
+
username: "Имя пользователя или электронная почта",
|
590
|
+
password: "Пароль",
|
591
|
+
login: "Войти",
|
592
|
+
forgotPasswordLink: "Забыли пароль?",
|
593
|
+
mailAddress: "Адрес электронной почты",
|
594
|
+
requestLink: "Запросить ссылку",
|
595
|
+
digits: "Код",
|
596
|
+
loginLink: "Войти",
|
597
|
+
secondFactor: "Код второго фактора",
|
598
|
+
sendDigits: "Отправить код",
|
599
|
+
sendSecondFactorDigits: "Отправить код",
|
600
|
+
resetLoginProcess: "Вернуться к входу",
|
601
|
+
messageEmptyUserName: "Пожалуйста, введите имя пользователя",
|
602
|
+
messageEmptyPassword: "Пожалуйста, введите пароль",
|
603
|
+
messageEmptyBoth: "Пожалуйста, введите имя пользователя и пароль",
|
604
|
+
messageEmptyEmail: "Пожалуйста, введите адрес электронной почты",
|
605
|
+
messageInvalidEmail:
|
606
|
+
"Пожалуйста, введите действительный адрес электронной почты",
|
607
|
+
digitsEmpty: "Пожалуйста, введите код",
|
608
|
+
digitsInvalid: "Пожалуйста, введите действительный код",
|
609
|
+
messageLoginFailed: "Ошибка входа, проверьте введенные данные.",
|
610
|
+
messageForbidden:
|
611
|
+
"Вход выполнен, но у вас нет прав. Вы <b>не можете</b> войти.<br>Вы можете выбрать другого пользователя или связаться с администратором.",
|
612
|
+
messageSomethingWentWrong: "Что-то пошло не так, попробуйте позже.",
|
613
|
+
messageThisFormIsNotConfigured: "Эта форма не настроена.",
|
614
|
+
messagePasswordResetDisabled:
|
615
|
+
"Эта функция не работает, потому что двухфакторная аутентификация<br> включена в вашей учетной записи. Пожалуйста, свяжитесь с администратором.",
|
616
|
+
};
|
617
|
+
|
618
|
+
case "ja": // Japanese
|
619
|
+
return {
|
620
|
+
username: "ユーザー名またはメールアドレス",
|
621
|
+
password: "パスワード",
|
622
|
+
login: "ログイン",
|
623
|
+
forgotPasswordLink: "パスワードを忘れましたか?",
|
624
|
+
mailAddress: "メールアドレス",
|
625
|
+
requestLink: "リンクをリクエスト",
|
626
|
+
digits: "コード",
|
627
|
+
loginLink: "ログイン",
|
628
|
+
secondFactor: "二要素コード",
|
629
|
+
sendDigits: "コードを送信",
|
630
|
+
sendSecondFactorDigits: "コードを送信",
|
631
|
+
resetLoginProcess: "ログインに戻る",
|
632
|
+
messageEmptyUserName: "ユーザー名を入力してください",
|
633
|
+
messageEmptyPassword: "パスワードを入力してください",
|
634
|
+
messageEmptyBoth: "ユーザー名とパスワードを入力してください",
|
635
|
+
messageEmptyEmail: "メールアドレスを入力してください",
|
636
|
+
messageInvalidEmail: "有効なメールアドレスを入力してください",
|
637
|
+
digitsEmpty: "コードを入力してください",
|
638
|
+
digitsInvalid: "有効なコードを入力してください",
|
639
|
+
messageLoginFailed:
|
640
|
+
"ログインに失敗しました。入力内容をご確認ください。",
|
641
|
+
messageForbidden:
|
642
|
+
"ログイン成功しましたが、権限がありません。<b>ログインできません</b>。<br>他のユーザーを選択するか、管理者に連絡してください。",
|
643
|
+
messageSomethingWentWrong:
|
644
|
+
"問題が発生しました。後でもう一度お試しください。",
|
645
|
+
messageThisFormIsNotConfigured: "このフォームは設定されていません。",
|
646
|
+
messagePasswordResetDisabled:
|
647
|
+
"この機能は使用できません。アカウントで二要素認証が有効になっているため、管理者に連絡してください。",
|
648
|
+
};
|
649
|
+
|
650
|
+
case "pa": // Western Punjabi
|
651
|
+
return {
|
652
|
+
username: "ਵਰਤਕਰ ਨਮ ਜ ਈ-ਮਲ",
|
653
|
+
password: "ਪਸਵਰਡ",
|
654
|
+
login: "ਲਗਨ ਕਰ",
|
655
|
+
forgotPasswordLink: "ਪਸਵਰਡ ਭਲ ਗਏ?",
|
656
|
+
mailAddress: "ਈ-ਮਲ ਪਤ",
|
657
|
+
requestLink: "ਲਕ ਦ ਬਨਤ ਕਰ",
|
658
|
+
digits: "ਕਡ",
|
659
|
+
loginLink: "ਲਗਨ ਕਰ",
|
660
|
+
secondFactor: "ਦਜ ਫਕਟਰ ਕਡ",
|
661
|
+
sendDigits: "ਕਡ ਭਜ",
|
662
|
+
sendSecondFactorDigits: "ਕਡ ਭਜ",
|
663
|
+
resetLoginProcess: "ਲਗਨ 'ਤ ਵਪਸ ਜਓ",
|
664
|
+
messageEmptyUserName: "ਕਰਪ ਕਰਕ ਆਪਣ ਵਰਤਕਰ ਨਮ ਦਰਜ ਕਰ",
|
665
|
+
messageEmptyPassword: "ਕਰਪ ਕਰਕ ਆਪਣ ਪਸਵਰਡ ਦਰਜ ਕਰ",
|
666
|
+
messageEmptyBoth: "ਕਰਪ ਕਰਕ ਆਪਣ ਵਰਤਕਰ ਨਮ ਤ ਪਸਵਰਡ ਦਰਜ ਕਰ",
|
667
|
+
messageEmptyEmail: "ਕਰਪ ਕਰਕ ਆਪਣ ਈ-ਮਲ ਪਤ ਦਰਜ ਕਰ",
|
668
|
+
messageInvalidEmail: "ਕਰਪ ਕਰਕ ਇਕ ਵਧ ਈ-ਮਲ ਪਤ ਦਰਜ ਕਰ",
|
669
|
+
digitsEmpty: "ਕਰਪ ਕਰਕ ਆਪਣ ਕਡ ਦਰਜ ਕਰ",
|
670
|
+
digitsInvalid: "ਕਰਪ ਕਰਕ ਇਕ ਵਧ ਕਡ ਦਰਜ ਕਰ",
|
671
|
+
messageLoginFailed: "ਲਗਨ ਅਸਫਲ ਹਇਆ, ਕਰਪ ਕਰਕ ਆਪਣ ਜਣਕਰ ਦ ਜਚ ਕਰ।",
|
672
|
+
messageForbidden:
|
673
|
+
"ਲਗਨ ਸਫਲ ਹਇਆ, ਪਰ ਤਹਡ ਕਲ ਅਧਕਰ ਨਹ ਹਨ। ਤਸ <b>ਲਗਨ ਨਹ</b> ਕਰ ਸਕਦ।<br>ਤਸ ਹਰ ਵਰਤਕਰ ਚਣ सकत ਹ ਜ ਪਰਬਧਕ ਨਲ ਸਪਰਕ ਕਰ ਸਕਦ ਹ।",
|
674
|
+
messageSomethingWentWrong: "ਕਝ ਗਲਤ ਹ ਗਆ, ਕਰਪ ਕਰਕ ਬਅਦ ਵਚ ਮੜ ਕਸਸ ਕਰ।",
|
675
|
+
messageThisFormIsNotConfigured: "ਇਸ ਫਰਮ ਨ ਸਰਚਤ ਨਹ ਕਤ ਗਆ ਹ।",
|
676
|
+
messagePasswordResetDisabled:
|
677
|
+
"ਇਹ ਫਕਸਨ ਕਮ ਨਹ ਕਰਦ ਕਉਕ ਤਹਡ ਖਤ ਵਚ ਦ ਫਕਟਰ ਪਰਮਣਕਰਣ ਸਰਗਰਮ ਹ। ਕਰਪ ਕਰਕ ਪਰਬਧਕ ਨਲ ਸਪਰਕ ਕਰ।",
|
678
|
+
};
|
679
|
+
|
680
|
+
case "mr": // Marathi
|
681
|
+
return {
|
682
|
+
username: "वपरकरनव कव ईमल",
|
683
|
+
password: "सकतशब",
|
684
|
+
login: "पवश कर",
|
685
|
+
forgotPasswordLink: "सकतशब वसरलत क?",
|
686
|
+
mailAddress: "ईमल पत",
|
687
|
+
requestLink: "लकच वनत कर",
|
688
|
+
digits: "कड",
|
689
|
+
loginLink: "पवश कर",
|
690
|
+
secondFactor: "दसर घटक कड",
|
691
|
+
sendDigits: "कड पठव",
|
692
|
+
sendSecondFactorDigits: "कड पठव",
|
693
|
+
resetLoginProcess: "पवशवर परत ज",
|
694
|
+
messageEmptyUserName: "कपय आपल वपरकरनव पवष कर",
|
695
|
+
messageEmptyPassword: "कपय आपल सकतशब पवष कर",
|
696
|
+
messageEmptyBoth: "कपय आपल वपरकरनव आण सकतशब पवष कर",
|
697
|
+
messageEmptyEmail: "कपय आपल ईमल पत पवष कर",
|
698
|
+
messageInvalidEmail: "कपय वध ईमल पत पवष कर",
|
699
|
+
digitsEmpty: "कपय आपल कड पवष कर",
|
700
|
+
digitsInvalid: "कपय वध कड पवष कर",
|
701
|
+
messageLoginFailed: "पवश अयशस, कपय आपल महत तपस.",
|
702
|
+
messageForbidden:
|
703
|
+
"पवश यशस झल, परत आपलकड परवन नह. आपण <b>पवश कर शकत नह</b>.<br>आपण दसर वपरकर नवड शकत कव ववसपकश सपर सध शकत.",
|
704
|
+
messageSomethingWentWrong: "कहतर चकल, कपय नतर पन पयत कर.",
|
705
|
+
messageThisFormIsNotConfigured: "ह फर सरचत कलल नह.",
|
706
|
+
messagePasswordResetDisabled:
|
707
|
+
"य करच कमगर करत नह करण आपल खतत दन घटक पमणकरण सकय कल आह. कपय ववसपकश सपर सध.",
|
708
|
+
};
|
709
|
+
|
710
|
+
case "fr": // French
|
711
|
+
return {
|
712
|
+
username: "Nom d'utilisateur ou e-mail",
|
713
|
+
password: "Mot de passe",
|
714
|
+
login: "Connexion",
|
715
|
+
forgotPasswordLink: "Mot de passe oublié ?",
|
716
|
+
mailAddress: "Adresse e-mail",
|
717
|
+
requestLink: "Demander un lien",
|
718
|
+
digits: "Code",
|
719
|
+
loginLink: "Connexion",
|
720
|
+
secondFactor: "Code du deuxième facteur",
|
721
|
+
sendDigits: "Envoyer le code",
|
722
|
+
sendSecondFactorDigits: "Envoyer le code",
|
723
|
+
resetLoginProcess: "Retour à la connexion",
|
724
|
+
messageEmptyUserName: "Veuillez entrer votre nom d'utilisateur",
|
725
|
+
messageEmptyPassword: "Veuillez entrer votre mot de passe",
|
726
|
+
messageEmptyBoth:
|
727
|
+
"Veuillez entrer votre nom d'utilisateur et votre mot de passe",
|
728
|
+
messageEmptyEmail: "Veuillez entrer votre adresse e-mail",
|
729
|
+
messageInvalidEmail: "Veuillez entrer une adresse e-mail valide",
|
730
|
+
digitsEmpty: "Veuillez entrer votre code",
|
731
|
+
digitsInvalid: "Veuillez entrer un code valide",
|
732
|
+
messageLoginFailed:
|
733
|
+
"Échec de la connexion, veuillez vérifier vos informations.",
|
734
|
+
messageForbidden:
|
735
|
+
"La connexion a réussi, mais vous n'avez pas les permissions. Vous <b>ne pouvez pas</b> vous connecter.<br>Vous pouvez choisir un autre utilisateur ou contacter l'administrateur.",
|
736
|
+
messageSomethingWentWrong:
|
737
|
+
"Une erreur s'est produite, veuillez réessayer plus tard.",
|
738
|
+
messageThisFormIsNotConfigured: "Ce formulaire n'est pas configuré.",
|
739
|
+
messagePasswordResetDisabled:
|
740
|
+
"Cette fonctionnalité ne fonctionne pas car l'authentification à deux facteurs est activée sur<br>votre compte. Veuillez contacter l'administrateur.",
|
741
|
+
};
|
742
|
+
|
743
|
+
case "it": // Italian
|
744
|
+
return {
|
745
|
+
username: "Nome utente o e-mail",
|
746
|
+
password: "Password",
|
747
|
+
login: "Accedi",
|
748
|
+
forgotPasswordLink: "Password dimenticata?",
|
749
|
+
mailAddress: "Indirizzo e-mail",
|
750
|
+
requestLink: "Richiedi link",
|
751
|
+
digits: "Codice",
|
752
|
+
loginLink: "Accedi",
|
753
|
+
secondFactor: "Codice a due fattori",
|
754
|
+
sendDigits: "Invia codice",
|
755
|
+
sendSecondFactorDigits: "Invia codice",
|
756
|
+
resetLoginProcess: "Torna al login",
|
757
|
+
messageEmptyUserName: "Per favore, inserisci il tuo nome utente",
|
758
|
+
messageEmptyPassword: "Per favore, inserisci la tua password",
|
759
|
+
messageEmptyBoth:
|
760
|
+
"Per favore, inserisci il tuo nome utente e la tua password",
|
761
|
+
messageEmptyEmail: "Per favore, inserisci il tuo indirizzo e-mail",
|
762
|
+
messageInvalidEmail: "Per favore, inserisci un indirizzo e-mail valido",
|
763
|
+
digitsEmpty: "Per favore, inserisci il tuo codice",
|
764
|
+
digitsInvalid: "Per favore, inserisci un codice valido",
|
765
|
+
messageLoginFailed: "Accesso fallito, verifica i tuoi dati.",
|
766
|
+
messageForbidden:
|
767
|
+
"Accesso riuscito, ma non hai i permessi. Non puoi accedere.<br>Puoi scegliere un altro account o contattare l'amministratore.",
|
768
|
+
messageSomethingWentWrong:
|
769
|
+
"Qualcosa è andato storto, riprova più tardi.",
|
770
|
+
messageThisFormIsNotConfigured: "Questo modulo non è configurato.",
|
771
|
+
messagePasswordResetDisabled:
|
772
|
+
"Questa funzione non funziona perché l'autenticazione a due<br>fattori è attiva sul tuo account. Contatta l'amministratore.",
|
773
|
+
};
|
774
|
+
|
775
|
+
case "nl": // Dutch
|
776
|
+
return {
|
777
|
+
username: "Gebruikersnaam of e-mail",
|
778
|
+
password: "Wachtwoord",
|
779
|
+
login: "Inloggen",
|
780
|
+
forgotPasswordLink: "Wachtwoord vergeten?",
|
781
|
+
mailAddress: "E-mailadres",
|
782
|
+
requestLink: "Link aanvragen",
|
783
|
+
digits: "Code",
|
784
|
+
loginLink: "Inloggen",
|
785
|
+
secondFactor: "Tweede factor code",
|
786
|
+
sendDigits: "Code verzenden",
|
787
|
+
sendSecondFactorDigits: "Code verzenden",
|
788
|
+
resetLoginProcess: "Terug naar inloggen",
|
789
|
+
messageEmptyUserName: "Voer uw gebruikersnaam in",
|
790
|
+
messageEmptyPassword: "Voer uw wachtwoord in",
|
791
|
+
messageEmptyBoth: "Voer uw gebruikersnaam en wachtwoord in",
|
792
|
+
messageEmptyEmail: "Voer uw e-mailadres in",
|
793
|
+
messageInvalidEmail: "Voer een geldig e-mailadres in",
|
794
|
+
digitsEmpty: "Voer uw code in",
|
795
|
+
digitsInvalid: "Voer een geldige code in",
|
796
|
+
messageLoginFailed: "Inloggen mislukt, controleer uw gegevens.",
|
797
|
+
messageForbidden:
|
798
|
+
"Inloggen geslaagd, maar u heeft geen permissies. U <b>kunt niet</b> inloggen.<br>U kunt een andere gebruiker selecteren of de beheerder contacteren.",
|
799
|
+
messageSomethingWentWrong:
|
800
|
+
"Er is iets fout gegaan, probeer het later opnieuw.",
|
801
|
+
messageThisFormIsNotConfigured: "Dit formulier is niet geconfigureerd.",
|
802
|
+
messagePasswordResetDisabled:
|
803
|
+
"Deze functie werkt niet omdat tweefactorauthenticatie is<br>ingeschakeld op uw account. Neem contact op met de beheerder.",
|
804
|
+
};
|
805
|
+
|
806
|
+
case "sv": // Swedish
|
807
|
+
return {
|
808
|
+
username: "Användarnamn eller e-post",
|
809
|
+
password: "Lösenord",
|
810
|
+
login: "Logga in",
|
811
|
+
forgotPasswordLink: "Glömt lösenord?",
|
812
|
+
mailAddress: "E-postadress",
|
813
|
+
requestLink: "Begär länk",
|
814
|
+
digits: "Kod",
|
815
|
+
loginLink: "Logga in",
|
816
|
+
secondFactor: "Tvåfaktorkod",
|
817
|
+
sendDigits: "Skicka kod",
|
818
|
+
sendSecondFactorDigits: "Skicka kod",
|
819
|
+
resetLoginProcess: "Tillbaka till inloggning",
|
820
|
+
messageEmptyUserName: "Ange ditt användarnamn",
|
821
|
+
messageEmptyPassword: "Ange ditt lösenord",
|
822
|
+
messageEmptyBoth: "Ange ditt användarnamn och lösenord",
|
823
|
+
messageEmptyEmail: "Ange din e-postadress",
|
824
|
+
messageInvalidEmail: "Ange en giltig e-postadress",
|
825
|
+
digitsEmpty: "Ange din kod",
|
826
|
+
digitsInvalid: "Ange en giltig kod",
|
827
|
+
messageLoginFailed:
|
828
|
+
"Inloggning misslyckades, kontrollera dina uppgifter.",
|
829
|
+
messageForbidden:
|
830
|
+
"Inloggningen lyckades, men du har inte behörighet. Du <b>kan inte</b> logga in.<br>Du kan välja en annan användare eller kontakta administratören.",
|
831
|
+
messageSomethingWentWrong: "Något gick fel, försök igen senare.",
|
832
|
+
messageThisFormIsNotConfigured: "Detta formulär är inte konfigurerat.",
|
833
|
+
messagePasswordResetDisabled:
|
834
|
+
"Denna funktion fungerar inte eftersom tvåfaktorsautentisering är aktiverad på ditt konto. Kontakta administratören.",
|
835
|
+
};
|
836
|
+
|
837
|
+
case "pl": // Polish
|
838
|
+
return {
|
839
|
+
username: "Nazwa użytkownika lub e-mail",
|
840
|
+
password: "Hasło",
|
841
|
+
login: "Zaloguj się",
|
842
|
+
forgotPasswordLink: "Zapomniałeś hasła?",
|
843
|
+
mailAddress: "Adres e-mail",
|
844
|
+
requestLink: "Zażądaj linku",
|
845
|
+
digits: "Kod",
|
846
|
+
loginLink: "Zaloguj się",
|
847
|
+
secondFactor: "Kod drugiego czynnika",
|
848
|
+
sendDigits: "Wyślij kod",
|
849
|
+
sendSecondFactorDigits: "Wyślij kod",
|
850
|
+
resetLoginProcess: "Powrót do logowania",
|
851
|
+
messageEmptyUserName: "Wprowadź swoją nazwę użytkownika",
|
852
|
+
messageEmptyPassword: "Wprowadź swoje hasło",
|
853
|
+
messageEmptyBoth: "Wprowadź swoją nazwę użytkownika i hasło",
|
854
|
+
messageEmptyEmail: "Wprowadź swój adres e-mail",
|
855
|
+
messageInvalidEmail: "Wprowadź prawidłowy adres e-mail",
|
856
|
+
digitsEmpty: "Wprowadź swój kod",
|
857
|
+
digitsInvalid: "Wprowadź prawidłowy kod",
|
858
|
+
messageLoginFailed: "Logowanie nie powiodło się, sprawdź swoje dane.",
|
859
|
+
messageForbidden:
|
860
|
+
"Logowanie powiodło się, ale nie masz uprawnień. <b>Nie możesz</b> się zalogować.<br>Możesz wybrać innego użytkownika lub skontaktować się z administratorem.",
|
861
|
+
messageSomethingWentWrong:
|
862
|
+
"Coś poszło nie tak, spróbuj ponownie później.",
|
863
|
+
messageThisFormIsNotConfigured:
|
864
|
+
"Ten formularz nie jest skonfigurowany.",
|
865
|
+
messagePasswordResetDisabled:
|
866
|
+
"Ta funkcja nie działa, ponieważ włączona jest autoryzacja dwuetapowa na twoim koncie. Skontaktuj się z administratorem.",
|
867
|
+
};
|
868
|
+
|
869
|
+
case "da": // Danish
|
870
|
+
return {
|
871
|
+
username: "Brugernavn eller e-mail",
|
872
|
+
password: "Adgangskode",
|
873
|
+
login: "Log ind",
|
874
|
+
forgotPasswordLink: "Glemt adgangskode?",
|
875
|
+
mailAddress: "E-mail-adresse",
|
876
|
+
requestLink: "Anmod om link",
|
877
|
+
digits: "Kode",
|
878
|
+
loginLink: "Log ind",
|
879
|
+
secondFactor: "Tofaktorkode",
|
880
|
+
sendDigits: "Send kode",
|
881
|
+
sendSecondFactorDigits: "Send kode",
|
882
|
+
resetLoginProcess: "Tilbage til log ind",
|
883
|
+
messageEmptyUserName: "Indtast dit brugernavn",
|
884
|
+
messageEmptyPassword: "Indtast din adgangskode",
|
885
|
+
messageEmptyBoth: "Indtast dit brugernavn og din adgangskode",
|
886
|
+
messageEmptyEmail: "Indtast din e-mail-adresse",
|
887
|
+
messageInvalidEmail: "Indtast en gyldig e-mail-adresse",
|
888
|
+
digitsEmpty: "Indtast din kode",
|
889
|
+
digitsInvalid: "Indtast en gyldig kode",
|
890
|
+
messageLoginFailed: "Login mislykkedes, kontrollér dine oplysninger.",
|
891
|
+
messageForbidden:
|
892
|
+
"Login lykkedes, men du har ikke tilladelse. Du <b>kan ikke</b> logge ind.<br>Du kan vælge en anden bruger eller kontakte administratoren.",
|
893
|
+
messageSomethingWentWrong: "Noget gik galt, prøv igen senere.",
|
894
|
+
messageThisFormIsNotConfigured: "Denne formular er ikke konfigureret.",
|
895
|
+
messagePasswordResetDisabled:
|
896
|
+
"Denne funktion fungerer ikke, fordi tofaktorautentificering<br>er aktiveret på din konto. Kontakt administratoren.",
|
897
|
+
};
|
898
|
+
|
899
|
+
case "no": // Norwegian
|
900
|
+
return {
|
901
|
+
username: "Brukernavn eller e-post",
|
902
|
+
password: "Passord",
|
903
|
+
login: "Logg inn",
|
904
|
+
forgotPasswordLink: "Glemt passord?",
|
905
|
+
mailAddress: "E-postadresse",
|
906
|
+
requestLink: "Be om lenke",
|
907
|
+
digits: "Kode",
|
908
|
+
loginLink: "Logg inn",
|
909
|
+
secondFactor: "Tofaktorkode",
|
910
|
+
sendDigits: "Send kode",
|
911
|
+
sendSecondFactorDigits: "Send kode",
|
912
|
+
resetLoginProcess: "Tilbake til innlogging",
|
913
|
+
messageEmptyUserName: "Vennligst skriv inn brukernavnet ditt",
|
914
|
+
messageEmptyPassword: "Vennligst skriv inn passordet ditt",
|
915
|
+
messageEmptyBoth: "Vennligst skriv inn brukernavn og passord",
|
916
|
+
messageEmptyEmail: "Vennligst skriv inn e-postadressen din",
|
917
|
+
messageInvalidEmail: "Vennligst skriv inn en gyldig e-postadresse",
|
918
|
+
digitsEmpty: "Vennligst skriv inn koden din",
|
919
|
+
digitsInvalid: "Vennligst skriv inn en gyldig kode",
|
920
|
+
messageLoginFailed:
|
921
|
+
"Innlogging mislyktes, vennligst sjekk informasjonen din.",
|
922
|
+
messageForbidden:
|
923
|
+
"Innloggingen var vellykket, men du har ikke tillatelse. Du <b>kan ikke</b> logge inn.<br>Du kan velge en annen bruker eller kontakte administratoren.",
|
924
|
+
messageSomethingWentWrong:
|
925
|
+
"Noe gikk galt, vennligst prøv igjen senere.",
|
926
|
+
messageThisFormIsNotConfigured: "Dette skjemaet er ikke konfigurert.",
|
927
|
+
messagePasswordResetDisabled:
|
928
|
+
"Denne funksjonen fungerer ikke fordi<br>tofaktorautentisering er aktivert på kontoen din. Kontakt administratoren.",
|
929
|
+
};
|
930
|
+
|
931
|
+
case "cs": // Czech
|
932
|
+
return {
|
933
|
+
username: "Uživatelské jméno nebo e-mail",
|
934
|
+
password: "Heslo",
|
935
|
+
login: "Přihlásit se",
|
936
|
+
forgotPasswordLink: "Zapomněli jste heslo?",
|
937
|
+
mailAddress: "E-mailová adresa",
|
938
|
+
requestLink: "Požádat o odkaz",
|
939
|
+
digits: "Kód",
|
940
|
+
loginLink: "Přihlásit se",
|
941
|
+
secondFactor: "Dvoufázový kód",
|
942
|
+
sendDigits: "Odeslat kód",
|
943
|
+
sendSecondFactorDigits: "Odeslat kód",
|
944
|
+
resetLoginProcess: "Zpět na přihlášení",
|
945
|
+
messageEmptyUserName: "Zadejte své uživatelské jméno",
|
946
|
+
messageEmptyPassword: "Zadejte své heslo",
|
947
|
+
messageEmptyBoth: "Zadejte své uživatelské jméno a heslo",
|
948
|
+
messageEmptyEmail: "Zadejte svou e-mailovou adresu",
|
949
|
+
messageInvalidEmail: "Zadejte platnou e-mailovou adresu",
|
950
|
+
digitsEmpty: "Zadejte svůj kód",
|
951
|
+
digitsInvalid: "Zadejte platný kód",
|
952
|
+
messageLoginFailed: "Přihlášení se nezdařilo, zkontrolujte své údaje.",
|
953
|
+
messageForbidden:
|
954
|
+
"Přihlášení bylo úspěšné, ale nemáte oprávnění. Nemůžete se přihlásit.<br>Vyberte jiného uživatele nebo kontaktujte správce.",
|
955
|
+
messageSomethingWentWrong: "Něco se pokazilo, zkuste to později.",
|
956
|
+
messageThisFormIsNotConfigured: "Tento formulář není nakonfigurován.",
|
957
|
+
messagePasswordResetDisabled:
|
958
|
+
"Tato funkce nefunguje, protože je na vašem<br>účtu aktivováno dvoufaktorové ověřování. Kontaktujte správce.",
|
959
|
+
};
|
960
|
+
|
961
|
+
default:
|
962
|
+
return {
|
963
|
+
username: "Username or E-Mail",
|
964
|
+
password: "Password",
|
965
|
+
login: "Login",
|
966
|
+
forgotPasswordLink: "Forgot Password?",
|
967
|
+
mailAddress: "E-Mail-Address",
|
968
|
+
requestLink: "Request Link",
|
969
|
+
digits: "Code",
|
970
|
+
loginLink: "Login",
|
971
|
+
secondFactor: "Second Factor Code",
|
972
|
+
sendDigits: "Send Code",
|
973
|
+
sendSecondFactorDigits: "Send Code",
|
974
|
+
resetLoginProcess: "Back to Login",
|
975
|
+
messageEmptyUserName: "Please enter your username",
|
976
|
+
messageEmptyPassword: "Please enter your password",
|
977
|
+
messageEmptyBoth: "Please enter your username and password",
|
978
|
+
messageEmptyEmail: "Please enter your email address",
|
979
|
+
messageInvalidEmail: "Please enter a valid email address",
|
980
|
+
digitsEmpty: "Please enter your code",
|
981
|
+
digitsInvalid: "Please enter a valid code",
|
982
|
+
messageLoginFailed: "Login failed, please check your input.",
|
983
|
+
messageForbidden:
|
984
|
+
"Login was successful, but you have no permission. You <b>cannot</b> login.<br>You can select another user or contact the administrator.",
|
985
|
+
messageSomethingWentWrong:
|
986
|
+
"Something went wrong, please try again later.",
|
987
|
+
messageThisFormIsNotConfigured: "This form is not configured.",
|
988
|
+
messagePasswordResetDisabled:
|
989
|
+
"This function does not work because two-factor<br>authentication is enabled on your account.<br>Please contact the administrator.",
|
990
|
+
};
|
991
|
+
}
|
984
992
|
}
|
985
993
|
|
986
994
|
/**
|
@@ -988,491 +996,491 @@ function getTranslations() {
|
|
988
996
|
* @return {initEventHandler}
|
989
997
|
*/
|
990
998
|
function initEventHandler() {
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
999
|
+
const self = this;
|
1000
|
+
const element = this[loginElementSymbol];
|
1001
|
+
|
1002
|
+
const type = "click";
|
1003
|
+
|
1004
|
+
element.addEventListener(type, function (event) {
|
1005
|
+
const callback = self.getOption("actions.click");
|
1006
|
+
|
1007
|
+
fireCustomEvent(self, "monster-login-clicked", {
|
1008
|
+
element: self,
|
1009
|
+
});
|
1010
|
+
|
1011
|
+
if (!isFunction(callback)) {
|
1012
|
+
return;
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
const element = findTargetElementFromEvent(
|
1016
|
+
event,
|
1017
|
+
ATTRIBUTE_ROLE,
|
1018
|
+
"control",
|
1019
|
+
);
|
1020
|
+
|
1021
|
+
if (!(element instanceof Node && self.hasNode(element))) {
|
1022
|
+
return;
|
1023
|
+
}
|
1024
|
+
|
1025
|
+
callback.call(self, event);
|
1026
|
+
});
|
1027
|
+
|
1028
|
+
this[forgotPasswordLinkSymbol].addEventListener(type, (event) => {
|
1029
|
+
event.preventDefault();
|
1030
|
+
this[forgotPasswordCollapseSymbol].open();
|
1031
|
+
setTimeout(() => {
|
1032
|
+
this.shadowRoot.querySelector("input[name='email']").focus();
|
1033
|
+
}, 0);
|
1034
|
+
});
|
1035
|
+
|
1036
|
+
this[loginLinkSymbol].addEventListener(type, (event) => {
|
1037
|
+
event.preventDefault();
|
1038
|
+
this[loginCollapseSymbol].open();
|
1039
|
+
|
1040
|
+
setTimeout(() => {
|
1041
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
1042
|
+
}, 0);
|
1043
|
+
});
|
1044
|
+
|
1045
|
+
for (const e of this[resetLoginProcessLinksSymbol]) {
|
1046
|
+
e.addEventListener(type, (event) => {
|
1047
|
+
event.preventDefault();
|
1048
|
+
this[loginCollapseSymbol].open();
|
1049
|
+
setTimeout(() => {
|
1050
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
1051
|
+
}, 0);
|
1052
|
+
});
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
this[loginCollapseSymbol].addEventListener("keydown", (event) => {
|
1056
|
+
if (event.key === "Enter") {
|
1057
|
+
this[loginButtonSymbol].click();
|
1058
|
+
}
|
1059
|
+
});
|
1060
|
+
|
1061
|
+
this[secondFactorCollapseSymbol].addEventListener("keydown", (event) => {
|
1062
|
+
if (event.key === "Enter") {
|
1063
|
+
this[secondFactorButtonSymbol].click();
|
1064
|
+
}
|
1065
|
+
});
|
1066
|
+
|
1067
|
+
this[forgotPasswordCollapseSymbol].addEventListener("keydown", (event) => {
|
1068
|
+
if (event.key === "Enter") {
|
1069
|
+
this[requestLinkButtonSymbol].click();
|
1070
|
+
}
|
1071
|
+
});
|
1072
|
+
|
1073
|
+
this[digitsCollapseSymbol].addEventListener("keydown", (event) => {
|
1074
|
+
if (event.key === "Enter") {
|
1075
|
+
this[digitsButtonSymbol].click();
|
1076
|
+
}
|
1077
|
+
});
|
1078
|
+
|
1079
|
+
this[loginButtonSymbol].setOption("actions.click", (event) => {
|
1080
|
+
// get username and password
|
1081
|
+
const username = this.shadowRoot.querySelector(
|
1082
|
+
"input[name='username']",
|
1083
|
+
).value;
|
1084
|
+
|
1085
|
+
const password = this.shadowRoot.querySelector("monster-password").value;
|
1086
|
+
|
1087
|
+
let missingBits = 0;
|
1088
|
+
if (username === "" || username === null) {
|
1089
|
+
this.setOption("classes.usernameInvalid", "invalid");
|
1090
|
+
missingBits |= 1; // Set bit 1 for username
|
1091
|
+
} else {
|
1092
|
+
this.setOption("classes.usernameInvalid", "");
|
1093
|
+
}
|
1094
|
+
|
1095
|
+
if (password === "" || password === null) {
|
1096
|
+
this.setOption("classes.passwordInvalid", "invalid");
|
1097
|
+
missingBits |= 2; // Set bit 2 for password
|
1098
|
+
} else {
|
1099
|
+
this.setOption("classes.passwordInvalid", "");
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
let msg = null;
|
1103
|
+
if (missingBits === 1) {
|
1104
|
+
// missing username
|
1105
|
+
msg = this.getOption("labels.messageEmptyUserName");
|
1106
|
+
|
1107
|
+
setTimeout(() => {
|
1108
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
1109
|
+
}, 0);
|
1110
|
+
} else if (missingBits === 2) {
|
1111
|
+
// missing password
|
1112
|
+
msg = this.getOption("labels.messageEmptyPassword");
|
1113
|
+
|
1114
|
+
setTimeout(() => {
|
1115
|
+
this.shadowRoot.querySelector("monster-password").focus();
|
1116
|
+
});
|
1117
|
+
} else if (missingBits === 3) {
|
1118
|
+
msg = this.getOption("labels.messageEmptyBoth");
|
1119
|
+
|
1120
|
+
setTimeout(() => {
|
1121
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
1122
|
+
}, 0);
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
const timeout = this.getOption("timeoutForMessage");
|
1126
|
+
|
1127
|
+
if (msg !== null && msg !== undefined) {
|
1128
|
+
this[loginButtonSymbol].setMessage(msg);
|
1129
|
+
this[loginButtonSymbol].showMessage(timeout);
|
1130
|
+
this[loginButtonSymbol].setState("failed", timeout);
|
1131
|
+
return;
|
1132
|
+
}
|
1133
|
+
|
1134
|
+
const url = this.getOption("fetch.login.url");
|
1135
|
+
|
1136
|
+
if (url === "" || url === null || url === undefined) {
|
1137
|
+
this[loginButtonSymbol].setMessage(
|
1138
|
+
this.getOption("labels.messageThisFormIsNotConfigured"),
|
1139
|
+
);
|
1140
|
+
this[loginButtonSymbol].showMessage(timeout);
|
1141
|
+
this[loginButtonSymbol].setState("failed", timeout);
|
1142
|
+
return;
|
1143
|
+
}
|
1144
|
+
|
1145
|
+
const options = {
|
1146
|
+
method: this.getOption("fetch.login.method"),
|
1147
|
+
mode: this.getOption("fetch.login.mode"),
|
1148
|
+
headers: this.getOption("fetch.login.headers"),
|
1149
|
+
credentials: this.getOption("fetch.login.credentials"),
|
1150
|
+
body: JSON.stringify({username, password}),
|
1151
|
+
};
|
1152
|
+
|
1153
|
+
getWindow()
|
1154
|
+
.fetch(url, options)
|
1155
|
+
.then((response) => {
|
1156
|
+
if (response.ok) {
|
1157
|
+
this[loginButtonSymbol].setState("successful", timeout);
|
1158
|
+
setTimeout(() => {
|
1159
|
+
this.openLoggedIn();
|
1160
|
+
}, 1200);
|
1161
|
+
} else {
|
1162
|
+
if (response.status === 403) {
|
1163
|
+
this[loginButtonSymbol].setMessage(
|
1164
|
+
this.getOption("labels.messageForbidden"),
|
1165
|
+
);
|
1166
|
+
} else if (response.status === 401) {
|
1167
|
+
const wwwAuthenticateHeader =
|
1168
|
+
response.headers.get("www-authenticate");
|
1169
|
+
if (wwwAuthenticateHeader) {
|
1170
|
+
const wwwAuthenticateParts = wwwAuthenticateHeader
|
1171
|
+
.split(/,\s*/)
|
1172
|
+
.map((part) => {
|
1173
|
+
const [key, value] = part.split("=");
|
1174
|
+
return {
|
1175
|
+
key: key.trim(),
|
1176
|
+
value: value ? value.trim().replace(/^"|"$/g, "") : null,
|
1177
|
+
};
|
1178
|
+
});
|
1179
|
+
|
1180
|
+
const filteredParts = wwwAuthenticateParts.filter(
|
1181
|
+
(part) => part.key.toLowerCase() === "2fa",
|
1182
|
+
);
|
1183
|
+
if (filteredParts.length > 0) {
|
1184
|
+
const timeout = this.getOption("timeoutForSuccess");
|
1185
|
+
this[loginButtonSymbol].setState("successful", timeout);
|
1186
|
+
setTimeout(() => {
|
1187
|
+
this.openSecondFactor();
|
1188
|
+
const digitsElement = this.shadowRoot.getElementById(
|
1189
|
+
"secondFactorControl",
|
1190
|
+
);
|
1191
|
+
digitsElement.focus();
|
1192
|
+
}, timeout);
|
1193
|
+
return;
|
1194
|
+
}
|
1195
|
+
}
|
1196
|
+
|
1197
|
+
this[loginButtonSymbol].setMessage(
|
1198
|
+
this.getOption("labels.messageLoginFailed"),
|
1199
|
+
);
|
1200
|
+
} else {
|
1201
|
+
this[loginButtonSymbol].setMessage(
|
1202
|
+
this.getOption("labels.messageSomethingWentWrong"),
|
1203
|
+
);
|
1204
|
+
}
|
1205
|
+
this[loginButtonSymbol].showMessage(timeout);
|
1206
|
+
this[loginButtonSymbol].setState("failed", timeout);
|
1207
|
+
|
1208
|
+
setTimeout(() => {
|
1209
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
1210
|
+
}, 0);
|
1211
|
+
}
|
1212
|
+
})
|
1213
|
+
.catch((error) => {
|
1214
|
+
this[loginButtonSymbol].setMessage(
|
1215
|
+
this.getOption("labels.messageSomethingWentWrong"),
|
1216
|
+
);
|
1217
|
+
this[loginButtonSymbol].showMessage(timeout);
|
1218
|
+
this[loginButtonSymbol].setState("failed", timeout);
|
1219
|
+
|
1220
|
+
setTimeout(() => {
|
1221
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
1222
|
+
}, 0);
|
1223
|
+
});
|
1224
|
+
});
|
1225
|
+
|
1226
|
+
this[requestLinkButtonSymbol].setOption("actions.click", (event) => {
|
1227
|
+
const emailElement = this.shadowRoot.querySelector("input[name='email']");
|
1228
|
+
|
1229
|
+
// get username and password
|
1230
|
+
const mail = emailElement.value;
|
1231
|
+
const valid = emailElement.checkValidity();
|
1232
|
+
|
1233
|
+
let msg = null;
|
1234
|
+
if (mail === "" || mail === null) {
|
1235
|
+
this.setOption("classes.emailInvalid", "invalid");
|
1236
|
+
msg = this.getOption("labels.messageEmptyEmail");
|
1237
|
+
} else if (!valid) {
|
1238
|
+
this.setOption("classes.emailInvalid", "invalid");
|
1239
|
+
msg = this.getOption("labels.messageInvalidEmail");
|
1240
|
+
} else {
|
1241
|
+
this.setOption("classes.emailInvalid", "");
|
1242
|
+
}
|
1243
|
+
|
1244
|
+
const timeout = this.getOption("timeoutForMessage");
|
1245
|
+
|
1246
|
+
if (msg !== null && msg !== undefined) {
|
1247
|
+
this[requestLinkButtonSymbol].setMessage(msg);
|
1248
|
+
this[requestLinkButtonSymbol].showMessage(timeout);
|
1249
|
+
this[requestLinkButtonSymbol].setState("failed", timeout);
|
1250
|
+
return;
|
1251
|
+
}
|
1252
|
+
|
1253
|
+
const url = this.getOption("fetch.forgotPassword.url");
|
1254
|
+
|
1255
|
+
if (url === "" || url === null || url === undefined) {
|
1256
|
+
this[requestLinkButtonSymbol].setMessage(
|
1257
|
+
this.getOption("labels.messageThisFormIsNotConfigured"),
|
1258
|
+
);
|
1259
|
+
this[requestLinkButtonSymbol].showMessage(timeout);
|
1260
|
+
this[requestLinkButtonSymbol].setState("failed", timeout);
|
1261
|
+
return;
|
1262
|
+
}
|
1263
|
+
|
1264
|
+
const options = {
|
1265
|
+
method: this.getOption("fetch.forgotPassword.method"),
|
1266
|
+
mode: this.getOption("fetch.forgotPassword.mode"),
|
1267
|
+
headers: this.getOption("fetch.forgotPassword.headers"),
|
1268
|
+
credentials: this.getOption("fetch.forgotPassword.credentials"),
|
1269
|
+
body: JSON.stringify({mail}),
|
1270
|
+
};
|
1271
|
+
|
1272
|
+
getWindow()
|
1273
|
+
.fetch(url, options)
|
1274
|
+
.then((response) => {
|
1275
|
+
if (response.ok) {
|
1276
|
+
const timeout = this.getOption("timeoutForSuccess");
|
1277
|
+
this[requestLinkButtonSymbol].setState("successful", timeout);
|
1278
|
+
setTimeout(() => {
|
1279
|
+
this.openDigits();
|
1280
|
+
}, timeout);
|
1281
|
+
} else {
|
1282
|
+
if (response.status === 403) {
|
1283
|
+
this[requestLinkButtonSymbol].setMessage(
|
1284
|
+
this.getOption("labels.messageForbidden"),
|
1285
|
+
);
|
1286
|
+
} else if (response.status === 401) {
|
1287
|
+
if (
|
1288
|
+
response.headers.has("x-password-reset") &&
|
1289
|
+
response.headers.get("x-password-reset").includes("disabled")
|
1290
|
+
) {
|
1291
|
+
this[requestLinkButtonSymbol].setMessage(
|
1292
|
+
this.getOption("labels.messagePasswordResetDisabled"),
|
1293
|
+
);
|
1294
|
+
} else {
|
1295
|
+
this[requestLinkButtonSymbol].setMessage(
|
1296
|
+
this.getOption("labels.messageLoginFailed"),
|
1297
|
+
);
|
1298
|
+
}
|
1299
|
+
} else {
|
1300
|
+
this[requestLinkButtonSymbol].setMessage(
|
1301
|
+
this.getOption("labels.messageSomethingWentWrong"),
|
1302
|
+
);
|
1303
|
+
}
|
1304
|
+
this[requestLinkButtonSymbol].showMessage(timeout);
|
1305
|
+
this[requestLinkButtonSymbol].setState("failed", timeout);
|
1306
|
+
}
|
1307
|
+
})
|
1308
|
+
.catch(() => {
|
1309
|
+
this[requestLinkButtonSymbol].setMessage(
|
1310
|
+
this.getOption("labels.messageSomethingWentWrong"),
|
1311
|
+
);
|
1312
|
+
this[requestLinkButtonSymbol].showMessage(timeout);
|
1313
|
+
this[requestLinkButtonSymbol].setState("failed", timeout);
|
1314
|
+
});
|
1315
|
+
});
|
1316
|
+
|
1317
|
+
this[secondFactorButtonSymbol].setOption("actions.click", (event) => {
|
1318
|
+
const digitsElement = this.shadowRoot.getElementById("secondFactorControl");
|
1319
|
+
|
1320
|
+
const digits = digitsElement.value;
|
1321
|
+
const valid = digitsElement.checkValidity();
|
1322
|
+
|
1323
|
+
let msg = null;
|
1324
|
+
if (digits === "" || digits === null) {
|
1325
|
+
msg = this.getOption("labels.digitsEmpty");
|
1326
|
+
} else if (!valid) {
|
1327
|
+
msg = this.getOption("labels.digitsInvalid");
|
1328
|
+
}
|
1329
|
+
|
1330
|
+
const timeout = this.getOption("timeoutForMessage");
|
1331
|
+
|
1332
|
+
if (msg !== null && msg !== undefined) {
|
1333
|
+
this[secondFactorButtonSymbol].setMessage(msg);
|
1334
|
+
this[secondFactorButtonSymbol].showMessage(timeout);
|
1335
|
+
this[secondFactorButtonSymbol].setState("failed", timeout);
|
1336
|
+
return;
|
1337
|
+
}
|
1338
|
+
|
1339
|
+
const url = this.getOption("fetch.secondFactor.url");
|
1340
|
+
|
1341
|
+
if (url === "" || url === null || url === undefined) {
|
1342
|
+
this[secondFactorButtonSymbol].setMessage(
|
1343
|
+
this.getOption("labels.messageThisFormIsNotConfigured"),
|
1344
|
+
);
|
1345
|
+
this[secondFactorButtonSymbol].showMessage(timeout);
|
1346
|
+
this[secondFactorButtonSymbol].setState("failed", timeout);
|
1347
|
+
return;
|
1348
|
+
}
|
1349
|
+
|
1350
|
+
const options = {
|
1351
|
+
method: this.getOption("fetch.secondFactor.method"),
|
1352
|
+
mode: this.getOption("fetch.secondFactor.mode"),
|
1353
|
+
headers: this.getOption("fetch.secondFactor.headers"),
|
1354
|
+
credentials: this.getOption("fetch.secondFactor.credentials"),
|
1355
|
+
body: JSON.stringify({digits}),
|
1356
|
+
};
|
1357
|
+
|
1358
|
+
getWindow()
|
1359
|
+
.fetch(url, options)
|
1360
|
+
.then((response) => {
|
1361
|
+
if (response.ok) {
|
1362
|
+
const timeout = this.getOption("timeoutForSuccess");
|
1363
|
+
this[secondFactorButtonSymbol].setState("successful", timeout);
|
1364
|
+
setTimeout(() => {
|
1365
|
+
this.openLoggedIn();
|
1366
|
+
}, timeout);
|
1367
|
+
} else {
|
1368
|
+
if (response.status === 403) {
|
1369
|
+
this[secondFactorButtonSymbol].setMessage(
|
1370
|
+
this.getOption("labels.messageForbidden"),
|
1371
|
+
);
|
1372
|
+
} else if (response.status === 401) {
|
1373
|
+
this[secondFactorButtonSymbol].setMessage(
|
1374
|
+
this.getOption("labels.messageLoginFailed"),
|
1375
|
+
);
|
1376
|
+
} else {
|
1377
|
+
this[secondFactorButtonSymbol].setMessage(
|
1378
|
+
this.getOption("labels.messageSomethingWentWrong"),
|
1379
|
+
);
|
1380
|
+
}
|
1381
|
+
this[secondFactorButtonSymbol].showMessage(timeout);
|
1382
|
+
this[secondFactorButtonSymbol].setState("failed", timeout);
|
1383
|
+
setTimeout(() => {
|
1384
|
+
digitsElement.focus();
|
1385
|
+
}, 0);
|
1386
|
+
}
|
1387
|
+
})
|
1388
|
+
.catch(() => {
|
1389
|
+
this[secondFactorButtonSymbol].setMessage(
|
1390
|
+
this.getOption("labels.messageSomethingWentWrong"),
|
1391
|
+
);
|
1392
|
+
this[secondFactorButtonSymbol].showMessage(timeout);
|
1393
|
+
this[secondFactorButtonSymbol].setState("failed", timeout);
|
1394
|
+
setTimeout(() => {
|
1395
|
+
digitsElement.focus();
|
1396
|
+
}, 0);
|
1397
|
+
});
|
1398
|
+
});
|
1399
|
+
|
1400
|
+
this[digitsButtonSymbol].setOption("actions.click", (event) => {
|
1401
|
+
const digitsElement = this.shadowRoot.getElementById("digitsControl");
|
1402
|
+
|
1403
|
+
const digits = digitsElement.value;
|
1404
|
+
const valid = digitsElement.checkValidity();
|
1405
|
+
|
1406
|
+
let msg = null;
|
1407
|
+
if (digits === "" || digits === null || digits === undefined) {
|
1408
|
+
msg = this.getOption("labels.digitsEmpty");
|
1409
|
+
} else if (!valid) {
|
1410
|
+
msg = this.getOption("labels.digitsInvalid");
|
1411
|
+
}
|
1412
|
+
|
1413
|
+
const timeout = this.getOption("timeoutForMessage");
|
1414
|
+
if (msg !== null && msg !== undefined) {
|
1415
|
+
this[digitsButtonSymbol].setMessage(msg);
|
1416
|
+
this[digitsButtonSymbol].showMessage(timeout);
|
1417
|
+
this[digitsButtonSymbol].setState("failed", timeout);
|
1418
|
+
return;
|
1419
|
+
}
|
1420
|
+
|
1421
|
+
const url = this.getOption("fetch.digits.url");
|
1422
|
+
|
1423
|
+
if (url === "" || url === null || url === undefined) {
|
1424
|
+
this[digitsButtonSymbol].setMessage(
|
1425
|
+
this.getOption("labels.messageThisFormIsNotConfigured"),
|
1426
|
+
);
|
1427
|
+
this[digitsButtonSymbol].showMessage(timeout);
|
1428
|
+
this[digitsButtonSymbol].setState("failed", timeout);
|
1429
|
+
return;
|
1430
|
+
}
|
1431
|
+
|
1432
|
+
const options = {
|
1433
|
+
method: this.getOption("fetch.digits.method"),
|
1434
|
+
mode: this.getOption("fetch.digits.mode"),
|
1435
|
+
headers: this.getOption("fetch.digits.headers"),
|
1436
|
+
credentials: this.getOption("fetch.digits.credentials"),
|
1437
|
+
body: JSON.stringify({digits}),
|
1438
|
+
};
|
1439
|
+
|
1440
|
+
getWindow()
|
1441
|
+
.fetch(url, options)
|
1442
|
+
.then((response) => {
|
1443
|
+
const timeout = this.getOption("timeoutForSuccess");
|
1444
|
+
|
1445
|
+
if (response.ok) {
|
1446
|
+
this[digitsButtonSymbol].setState("successful", timeout);
|
1447
|
+
setTimeout(() => {
|
1448
|
+
this.openLoggedIn();
|
1449
|
+
}, timeout);
|
1450
|
+
} else {
|
1451
|
+
if (response.status === 403) {
|
1452
|
+
this[digitsButtonSymbol].setMessage(
|
1453
|
+
this.getOption("labels.messageForbidden"),
|
1454
|
+
);
|
1455
|
+
} else if (response.status === 401) {
|
1456
|
+
this[digitsButtonSymbol].setMessage(
|
1457
|
+
this.getOption("labels.messageLoginFailed"),
|
1458
|
+
);
|
1459
|
+
} else {
|
1460
|
+
this[digitsButtonSymbol].setMessage(
|
1461
|
+
this.getOption("labels.messageSomethingWentWrong"),
|
1462
|
+
);
|
1463
|
+
}
|
1464
|
+
this[digitsButtonSymbol].showMessage(timeout);
|
1465
|
+
this[digitsButtonSymbol].setState("failed", timeout);
|
1466
|
+
setTimeout(() => {
|
1467
|
+
digitsElement.focus();
|
1468
|
+
}, 0);
|
1469
|
+
}
|
1470
|
+
})
|
1471
|
+
.catch(() => {
|
1472
|
+
this[digitsButtonSymbol].setMessage(
|
1473
|
+
this.getOption("labels.messageSomethingWentWrong"),
|
1474
|
+
);
|
1475
|
+
this[digitsButtonSymbol].showMessage(timeout);
|
1476
|
+
this[digitsButtonSymbol].setState("failed", timeout);
|
1477
|
+
setTimeout(() => {
|
1478
|
+
digitsElement.focus();
|
1479
|
+
}, 0);
|
1480
|
+
});
|
1481
|
+
});
|
1482
|
+
|
1483
|
+
return this;
|
1476
1484
|
}
|
1477
1485
|
|
1478
1486
|
/**
|
@@ -1480,50 +1488,50 @@ function initEventHandler() {
|
|
1480
1488
|
* @return {void}
|
1481
1489
|
*/
|
1482
1490
|
function initControlReferences() {
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1491
|
+
this[loginElementSymbol] = this.shadowRoot.querySelector(
|
1492
|
+
`[${ATTRIBUTE_ROLE}="control"]`,
|
1493
|
+
);
|
1494
|
+
|
1495
|
+
// data-monster-role="forgot-password-link"
|
1496
|
+
|
1497
|
+
this[forgotPasswordLinkSymbol] = this.shadowRoot.querySelector(
|
1498
|
+
`[data-monster-role="forgot-password-link"]`,
|
1499
|
+
);
|
1500
|
+
|
1501
|
+
this[forgotPasswordCollapseSymbol] = this.shadowRoot.querySelector(
|
1502
|
+
`[data-monster-role="forgot-password-collapse"]`,
|
1503
|
+
);
|
1504
|
+
|
1505
|
+
this[loginCollapseSymbol] = this.shadowRoot.querySelector(
|
1506
|
+
`[data-monster-role="login-collapse"]`,
|
1507
|
+
);
|
1508
|
+
|
1509
|
+
this[loginLinkSymbol] = this.shadowRoot.querySelector(
|
1510
|
+
`[data-monster-role="login-link"]`,
|
1511
|
+
);
|
1512
|
+
|
1513
|
+
this[secondFactorCollapseSymbol] = this.shadowRoot.querySelector(
|
1514
|
+
`[data-monster-role="second-factor-collapse"]`,
|
1515
|
+
);
|
1516
|
+
|
1517
|
+
this[resetLoginProcessLinksSymbol] = this.shadowRoot.querySelectorAll(
|
1518
|
+
`[data-monster-role="reset-login-process-link"]`,
|
1519
|
+
);
|
1520
|
+
|
1521
|
+
this[loggedInCollapseSymbol] = this.shadowRoot.querySelector(
|
1522
|
+
`[data-monster-role="logged-in-collapse"]`,
|
1523
|
+
);
|
1524
|
+
|
1525
|
+
this[digitsCollapseSymbol] = this.shadowRoot.querySelector(
|
1526
|
+
`[data-monster-role="digits-collapse"]`,
|
1527
|
+
);
|
1528
|
+
|
1529
|
+
this[loginButtonSymbol] = this.shadowRoot.getElementById("loginButton");
|
1530
|
+
this[requestLinkButtonSymbol] =
|
1531
|
+
this.shadowRoot.getElementById("requestLinkButton");
|
1532
|
+
this[secondFactorButtonSymbol] =
|
1533
|
+
this.shadowRoot.getElementById("secondFactorButton");
|
1534
|
+
this[digitsButtonSymbol] = this.shadowRoot.getElementById("digitsButton");
|
1527
1535
|
}
|
1528
1536
|
|
1529
1537
|
/**
|
@@ -1531,8 +1539,8 @@ function initControlReferences() {
|
|
1531
1539
|
* @return {string}
|
1532
1540
|
*/
|
1533
1541
|
function getTemplate() {
|
1534
|
-
|
1535
|
-
|
1542
|
+
// language=HTML
|
1543
|
+
return `
|
1536
1544
|
|
1537
1545
|
<template id="urls">
|
1538
1546
|
<li><a data-monster-attributes="href path:urls.url"
|
@@ -1543,20 +1551,20 @@ function getTemplate() {
|
|
1543
1551
|
|
1544
1552
|
<monster-collapse data-monster-option-openByDefault="true"
|
1545
1553
|
data-monster-role="login-collapse"
|
1546
|
-
|
1554
|
+
exportparts="control:collapse-login-control,
|
1547
1555
|
container:collapse-login-container,
|
1548
1556
|
deco:collapse-login-deco"
|
1549
1557
|
part="login-collapse"
|
1550
1558
|
>
|
1551
1559
|
<monster-field-set
|
1552
|
-
|
1560
|
+
exportparts="
|
1553
1561
|
control:field-set-login-control,
|
1554
1562
|
header:field-set-login-header,
|
1555
1563
|
title:field-set-login-title,
|
1556
1564
|
container:field-set-login-container,
|
1557
1565
|
content:field-set-login-content,
|
1558
1566
|
collapse:field-set-login-collapse"
|
1559
|
-
|
1567
|
+
part="login-field-set">
|
1560
1568
|
<slot name="login-header"></slot>
|
1561
1569
|
<label part="login-label" data-monster-replace="path:labels.username"></label>
|
1562
1570
|
<input type="text" name="username" autofocus autocomplete="off">
|
@@ -1566,7 +1574,7 @@ function getTemplate() {
|
|
1566
1574
|
<div data-monster-attributes="class path:classes.passwordInvalid"></div>
|
1567
1575
|
<monster-message-state-button id="loginButton"
|
1568
1576
|
part="login-button"
|
1569
|
-
|
1577
|
+
exportparts="
|
1570
1578
|
control:login-button-control,
|
1571
1579
|
button:login-button-button,
|
1572
1580
|
popper:login-button-popper,
|
@@ -1583,13 +1591,13 @@ function getTemplate() {
|
|
1583
1591
|
|
1584
1592
|
</monster-collapse>
|
1585
1593
|
<monster-collapse data-monster-role="forgot-password-collapse"
|
1586
|
-
|
1594
|
+
exportparts="control:collapse-forgot-password-control,
|
1587
1595
|
container:collapse-forgot-password-container,
|
1588
1596
|
deco:collapse-forgot-password-deco"
|
1589
|
-
|
1597
|
+
part="forgot-password-collapse">
|
1590
1598
|
|
1591
1599
|
<monster-field-set part="forgot-password-field-set"
|
1592
|
-
|
1600
|
+
exportparts="
|
1593
1601
|
control:field-set-forgot-password-control,
|
1594
1602
|
header:field-set-forgot-password-header,
|
1595
1603
|
title:field-set-forgot-password-title,
|
@@ -1602,17 +1610,17 @@ function getTemplate() {
|
|
1602
1610
|
data-monster-attributes="accesskey path:accessKeys.username"
|
1603
1611
|
autocomplete="off">
|
1604
1612
|
<div data-monster-attributes="class path:classes.emailInvalid"></div>
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1613
|
+
<monster-message-state-button id="requestLinkButton"
|
1614
|
+
part="request-link-button"
|
1615
|
+
exportparts="
|
1608
1616
|
control:forgot-password-button-control,
|
1609
1617
|
button:forgot-password-button-button,
|
1610
1618
|
popper:forgot-password-button-popper,
|
1611
1619
|
message:forgot-password-button-message,
|
1612
1620
|
button-button:forgot-password-button-button,
|
1613
1621
|
button-control:forgot-password-button-control"
|
1614
|
-
|
1615
|
-
|
1622
|
+
data-monster-attributes="accesskey path:accessKeys.password"
|
1623
|
+
data-monster-replace="path:labels.requestLink"></monster-message-state-button>
|
1616
1624
|
<a href="#"
|
1617
1625
|
data-monster-attributes="accesskey path:accessKeys.loginLink"
|
1618
1626
|
data-monster-role="login-link"
|
@@ -1623,13 +1631,13 @@ function getTemplate() {
|
|
1623
1631
|
|
1624
1632
|
</monster-collapse>
|
1625
1633
|
<monster-collapse data-monster-role="second-factor-collapse"
|
1626
|
-
|
1634
|
+
exportparts="control:collapse-second-factor-control,
|
1627
1635
|
container:collapse-second-factor-container,
|
1628
1636
|
deco:collapse-second-factor-deco"
|
1629
|
-
|
1637
|
+
part="second-factor-collapse">
|
1630
1638
|
|
1631
1639
|
<monster-field-set part="second-factor-field-set"
|
1632
|
-
|
1640
|
+
exportparts="
|
1633
1641
|
control:field-set-second-factor-control,
|
1634
1642
|
header:field-set-second-factor-header,
|
1635
1643
|
title:field-set-second-factor-title,
|
@@ -1642,17 +1650,17 @@ function getTemplate() {
|
|
1642
1650
|
<monster-digits data-monster-attributes="data-monster-option-digits path:digits"
|
1643
1651
|
id="secondFactorControl"></monster-digits>
|
1644
1652
|
</div>
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1653
|
+
<!-- SECOND FACTOR COLLAPSE -->
|
1654
|
+
<monster-message-state-button id="secondFactorButton"
|
1655
|
+
part="secondFactor-digits-button"
|
1656
|
+
exportparts="
|
1649
1657
|
control:second-factor-button-control,
|
1650
1658
|
button:second-factor-button-button,
|
1651
1659
|
popper:second-factor-button-popper,
|
1652
1660
|
message:second-factor-button-message,
|
1653
1661
|
button-button:second-factor-button-button,
|
1654
1662
|
button-control:second-factor-button-control"
|
1655
|
-
|
1663
|
+
data-monster-replace="path:labels.sendSecondFactorDigits"></monster-message-state-button>
|
1656
1664
|
|
1657
1665
|
<a href="#" data-monster-role="reset-login-process-link"
|
1658
1666
|
part="reset-login-process-link"
|
@@ -1662,13 +1670,13 @@ function getTemplate() {
|
|
1662
1670
|
|
1663
1671
|
</monster-collapse>
|
1664
1672
|
<monster-collapse data-monster-role="digits-collapse"
|
1665
|
-
|
1673
|
+
exportparts="control:collapse-digits-control,
|
1666
1674
|
container:collapse-digits-container,
|
1667
1675
|
deco:collapse-digits-deco"
|
1668
|
-
|
1676
|
+
part="digits-collapse">
|
1669
1677
|
|
1670
1678
|
<monster-field-set part="digits-field-set"
|
1671
|
-
|
1679
|
+
exportparts="
|
1672
1680
|
control:field-set-digits-control,
|
1673
1681
|
header:field-set-digits-header,
|
1674
1682
|
title:field-set-digits-title,
|
@@ -1683,7 +1691,7 @@ function getTemplate() {
|
|
1683
1691
|
</div>
|
1684
1692
|
<monster-message-state-button id="digitsButton"
|
1685
1693
|
part="digits-button"
|
1686
|
-
|
1694
|
+
exportparts="
|
1687
1695
|
control:digits-button-control,
|
1688
1696
|
button:digits-button-button,
|
1689
1697
|
popper:digits-button-popper,
|
@@ -1699,11 +1707,11 @@ function getTemplate() {
|
|
1699
1707
|
|
1700
1708
|
</monster-collapse>
|
1701
1709
|
<monster-collapse data-monster-role="logged-in-collapse"
|
1702
|
-
|
1710
|
+
exportparts="
|
1703
1711
|
control:collapse-success-control,
|
1704
1712
|
container:collapse-success-container,
|
1705
1713
|
deco:collapse-success-deco"
|
1706
|
-
|
1714
|
+
part="logged-in-collapse">
|
1707
1715
|
<div>
|
1708
1716
|
<slot name="logged-in-header"></slot>
|
1709
1717
|
<ul data-monster-insert="urls path:successUrls"></ul>
|