@schukai/monster 3.114.1 → 3.114.3
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 +1402 -1393
@@ -10,22 +10,22 @@
|
|
10
10
|
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
11
11
|
*/
|
12
12
|
|
13
|
-
import {instanceSymbol} from "../../constants.mjs";
|
14
|
-
import {addAttributeToken} from "../../dom/attributes.mjs";
|
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 {CustomControl} from "../../dom/customcontrol.mjs";
|
20
|
-
import {CustomElement} from "../../dom/customelement.mjs";
|
19
|
+
import { CustomControl } from "../../dom/customcontrol.mjs";
|
20
|
+
import { CustomElement } from "../../dom/customelement.mjs";
|
21
21
|
import {
|
22
|
-
|
23
|
-
|
22
|
+
assembleMethodSymbol,
|
23
|
+
registerCustomElement,
|
24
24
|
} from "../../dom/customelement.mjs";
|
25
|
-
import {findTargetElementFromEvent} from "../../dom/events.mjs";
|
26
|
-
import {isFunction} from "../../types/is.mjs";
|
27
|
-
import {LoginStyleSheet} from "./stylesheet/login.mjs";
|
28
|
-
import {fireCustomEvent} from "../../dom/events.mjs";
|
25
|
+
import { findTargetElementFromEvent } from "../../dom/events.mjs";
|
26
|
+
import { isFunction } from "../../types/is.mjs";
|
27
|
+
import { LoginStyleSheet } from "./stylesheet/login.mjs";
|
28
|
+
import { fireCustomEvent } from "../../dom/events.mjs";
|
29
29
|
|
30
30
|
import "./form.mjs";
|
31
31
|
import "./field-set.mjs";
|
@@ -35,11 +35,11 @@ import "./digits.mjs";
|
|
35
35
|
import "../layout/collapse.mjs";
|
36
36
|
import "../datatable/datasource/rest.mjs";
|
37
37
|
|
38
|
-
import {InvalidStyleSheet} from "./stylesheet/invalid.mjs";
|
39
|
-
import {getLocaleOfDocument} from "../../dom/locale.mjs";
|
40
|
-
import {getWindow} from "../../dom/util.mjs";
|
38
|
+
import { InvalidStyleSheet } from "./stylesheet/invalid.mjs";
|
39
|
+
import { getLocaleOfDocument } from "../../dom/locale.mjs";
|
40
|
+
import { getWindow } from "../../dom/util.mjs";
|
41
41
|
|
42
|
-
export {Login};
|
42
|
+
export { Login };
|
43
43
|
|
44
44
|
/**
|
45
45
|
* @private
|
@@ -131,856 +131,857 @@ const digitsCollapseSymbol = Symbol("digitsCollapse");
|
|
131
131
|
* @summary A beautiful Login that can make your life easier and also looks good. It supports a lot of features.
|
132
132
|
*/
|
133
133
|
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
|
-
|
134
|
+
/**
|
135
|
+
* This method is called by the `instanceof` operator.
|
136
|
+
* @returns {symbol}
|
137
|
+
*/
|
138
|
+
static get [instanceSymbol]() {
|
139
|
+
return Symbol.for("@schukai/monster/components/form/login@@instance");
|
140
|
+
}
|
141
|
+
|
142
|
+
/**
|
143
|
+
*
|
144
|
+
* @return {Components.Form.Login
|
145
|
+
*/
|
146
|
+
[assembleMethodSymbol]() {
|
147
|
+
super[assembleMethodSymbol]();
|
148
|
+
|
149
|
+
setTimeout(() => {
|
150
|
+
initControlReferences.call(this);
|
151
|
+
initEventHandler.call(this);
|
152
|
+
|
153
|
+
setTimeout(() => {
|
154
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
155
|
+
}, 100);
|
156
|
+
}, 0);
|
157
|
+
return this;
|
158
|
+
}
|
159
|
+
|
160
|
+
/**
|
161
|
+
* To set the options via the HTML Tag, the attribute `data-monster-options` must be used.
|
162
|
+
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
163
|
+
*
|
164
|
+
* The individual configuration values can be found in the table.
|
165
|
+
*
|
166
|
+
* @property {Object} templates Template definitions
|
167
|
+
* @property {string} templates.main Main template
|
168
|
+
* @property {Object} labels Label definitions
|
169
|
+
* @property {Object} classes Class definitions
|
170
|
+
* @property {string} classes.usernameInvalid Class for invalid
|
171
|
+
* @property {string} classes.passwordInvalid Class for invalid
|
172
|
+
* @property {string} classes.emailInvalid Class for invalid
|
173
|
+
* @property {boolean} disabled Disabled
|
174
|
+
* @property {Object} features Feature definitions
|
175
|
+
* @property {boolean} features.forgotPassword Forgot Password enabled
|
176
|
+
* @property {boolean} features.redirectToFirstSuccessUrl Redirect to first success URL
|
177
|
+
* @property {Object} actions Action definitions
|
178
|
+
* @property {number} digits Digits
|
179
|
+
* @property {Object[]} successUrls Success URLs
|
180
|
+
* @property {string} successUrls.label Label
|
181
|
+
* @property {string} successUrls.url URL
|
182
|
+
* @property {number} timeoutForMessage Timeout for message
|
183
|
+
* @property {number} timeoutForSuccess Timeout for success
|
184
|
+
* @property {Object} accessKeys Access keys
|
185
|
+
* @property {string} accessKeys.loginLink Login link
|
186
|
+
* @property {string} accessKeys.username Username
|
187
|
+
* @property {string} accessKeys.password Password
|
188
|
+
* @property {Object} fetch Fetch definitions
|
189
|
+
* @property {Object} fetch.login Login fetch
|
190
|
+
* @property {string} fetch.login.url URL
|
191
|
+
* @property {string} fetch.login.method Method
|
192
|
+
* @property {string} fetch.login.mode Mode
|
193
|
+
* @property {Object} fetch.login.headers Headers
|
194
|
+
* @property {string} fetch.login.headers.accept Accept
|
195
|
+
* @property {string} fetch.login.credentials Credentials
|
196
|
+
* @property {Object} fetch.forgotPassword Forgot Password fetch
|
197
|
+
* @property {string} fetch.forgotPassword.url URL
|
198
|
+
* @property {string} fetch.forgotPassword.method Method
|
199
|
+
* @property {string} fetch.forgotPassword.mode Mode
|
200
|
+
* @property {Object} fetch.forgotPassword.headers Headers
|
201
|
+
* @property {string} fetch.forgotPassword.headers.accept Accept
|
202
|
+
* @property {string} fetch.forgotPassword.credentials Credentials
|
203
|
+
* @property {Object} fetch.digits Digits fetch
|
204
|
+
* @property {string} fetch.digits.url URL
|
205
|
+
* @property {string} fetch.digits.method Method
|
206
|
+
* @property {string} fetch.digits.mode Mode
|
207
|
+
* @property {Object} fetch.digits.headers Headers
|
208
|
+
* @property {string} fetch.digits.headers.accept Accept
|
209
|
+
* @property {string} fetch.digits.credentials Credentials
|
210
|
+
* @property {Object} fetch.secondFactor Second Factor fetch
|
211
|
+
* @property {string} fetch.secondFactor.url URL
|
212
|
+
* @property {string} fetch.secondFactor.method Method
|
213
|
+
* @property {string} fetch.secondFactor.mode Mode
|
214
|
+
* @property {Object} fetch.secondFactor.headers Headers
|
215
|
+
* @property {string} fetch.secondFactor.headers.accept Accept
|
216
|
+
* @property {string} fetch.secondFactor.credentials Credentials
|
217
|
+
*/
|
218
|
+
get defaults() {
|
219
|
+
return Object.assign({}, super.defaults, {
|
220
|
+
templates: {
|
221
|
+
main: getTemplate(),
|
222
|
+
},
|
223
|
+
labels: getTranslations(),
|
224
|
+
classes: {
|
225
|
+
usernameInvalid: "",
|
226
|
+
passwordInvalid: "",
|
227
|
+
emailInvalid: "",
|
228
|
+
},
|
229
|
+
disabled: false,
|
230
|
+
features: {
|
231
|
+
forgotPassword: true,
|
232
|
+
redirectToFirstSuccessUrl: false,
|
233
|
+
},
|
234
|
+
actions: {},
|
235
|
+
|
236
|
+
digits: 6,
|
237
|
+
|
238
|
+
successUrls: [
|
239
|
+
{
|
240
|
+
label: "Home",
|
241
|
+
url: "/",
|
242
|
+
},
|
243
|
+
{
|
244
|
+
label: "Logout",
|
245
|
+
url: "/logout",
|
246
|
+
},
|
247
|
+
],
|
248
|
+
|
249
|
+
timeoutForMessage: 3500,
|
250
|
+
timeoutForSuccess: 1000,
|
251
|
+
|
252
|
+
accessKeys: {
|
253
|
+
loginLink: "x",
|
254
|
+
username: "u",
|
255
|
+
password: "p",
|
256
|
+
},
|
257
|
+
|
258
|
+
fetch: {
|
259
|
+
login: {
|
260
|
+
url: "",
|
261
|
+
method: "POST",
|
262
|
+
mode: "same-origin",
|
263
|
+
headers: {
|
264
|
+
Accept: "application/json",
|
265
|
+
"Content-Type": "application/json; charset=utf-8",
|
266
|
+
},
|
267
|
+
credentials: "same-origin",
|
268
|
+
},
|
269
|
+
forgotPassword: {
|
270
|
+
url: "",
|
271
|
+
method: "POST",
|
272
|
+
mode: "same-origin",
|
273
|
+
headers: {
|
274
|
+
Accept: "application/json",
|
275
|
+
"Content-Type": "application/json; charset=utf-8",
|
276
|
+
},
|
277
|
+
credentials: "same-origin",
|
278
|
+
},
|
279
|
+
digits: {
|
280
|
+
url: "",
|
281
|
+
method: "POST",
|
282
|
+
mode: "same-origin",
|
283
|
+
headers: {
|
284
|
+
Accept: "application/json",
|
285
|
+
"Content-Type": "application/json; charset=utf-8",
|
286
|
+
},
|
287
|
+
credentials: "same-origin",
|
288
|
+
},
|
289
|
+
secondFactor: {
|
290
|
+
url: "",
|
291
|
+
method: "POST",
|
292
|
+
mode: "same-origin",
|
293
|
+
headers: {
|
294
|
+
Accept: "application/json",
|
295
|
+
"Content-Type": "application/json; charset=utf-8",
|
296
|
+
},
|
297
|
+
credentials: "same-origin",
|
298
|
+
},
|
299
|
+
},
|
300
|
+
});
|
301
|
+
}
|
302
|
+
|
303
|
+
/**
|
304
|
+
* Opens the login collapse and focuses the username control.
|
305
|
+
*
|
306
|
+
* @returns {Login}
|
307
|
+
*/
|
308
|
+
openLogin() {
|
309
|
+
this[loginCollapseSymbol].open();
|
310
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
311
|
+
return this;
|
312
|
+
}
|
313
|
+
|
314
|
+
/**
|
315
|
+
* Opens the forgot password collapse. If the feature `forgotPassword` is not enabled, an error will be thrown.
|
316
|
+
*
|
317
|
+
* @returns {Login}
|
318
|
+
* @throws {Error} If the feature is not enabled
|
319
|
+
*/
|
320
|
+
openForgotPassword() {
|
321
|
+
if (!this.getOption("features.forgotPassword")) {
|
322
|
+
throw new Error("Forgot Password is not enabled");
|
323
|
+
}
|
324
|
+
|
325
|
+
this[forgotPasswordCollapseSymbol].open();
|
326
|
+
return this;
|
327
|
+
}
|
328
|
+
|
329
|
+
/**
|
330
|
+
* Opens the second factor collapse and focuses the second factor control.
|
331
|
+
* @returns {Login}
|
332
|
+
*/
|
333
|
+
openSecondFactor() {
|
334
|
+
this[secondFactorCollapseSymbol].open();
|
335
|
+
this.shadowRoot.getElementById("secondFactorButton").focus();
|
336
|
+
return this;
|
337
|
+
}
|
338
|
+
|
339
|
+
/**
|
340
|
+
* Opens the digits collapse and focuses the digits control.
|
341
|
+
* @returns {Login}
|
342
|
+
*/
|
343
|
+
openDigits() {
|
344
|
+
this[digitsCollapseSymbol].open();
|
345
|
+
this.shadowRoot.getElementById("digitsControl").focus();
|
346
|
+
return this;
|
347
|
+
}
|
348
|
+
|
349
|
+
/**
|
350
|
+
* Opens the logged in collapse. If the feature `redirectToFirstSuccessUrl` is enabled, the user will be redirected to the first success URL.
|
351
|
+
*
|
352
|
+
* @returns {Login}
|
353
|
+
*/
|
354
|
+
openLoggedIn() {
|
355
|
+
this[loggedInCollapseSymbol].open();
|
356
|
+
|
357
|
+
if (this.getOption("features.redirectToFirstSuccessUrl")) {
|
358
|
+
setTimeout(() => {
|
359
|
+
const successUrl = this.getOption("successUrls");
|
360
|
+
if (successUrl.length > 0) {
|
361
|
+
const success = successUrl[0].url;
|
362
|
+
if (success) {
|
363
|
+
getWindow().location.href = success;
|
364
|
+
}
|
365
|
+
}
|
366
|
+
}, this.getOption("timeoutForSuccess"));
|
367
|
+
|
368
|
+
return;
|
369
|
+
}
|
370
|
+
|
371
|
+
return this;
|
372
|
+
}
|
373
|
+
|
374
|
+
/**
|
375
|
+
* @return {string}
|
376
|
+
*/
|
377
|
+
static getTag() {
|
378
|
+
return "monster-login";
|
379
|
+
}
|
380
|
+
|
381
|
+
/**
|
382
|
+
* @return {CSSStyleSheet[]}
|
383
|
+
*/
|
384
|
+
static getCSSStyleSheet() {
|
385
|
+
return [LoginStyleSheet, InvalidStyleSheet];
|
386
|
+
}
|
386
387
|
}
|
387
388
|
|
388
389
|
function getTranslations() {
|
389
|
-
|
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
|
-
|
390
|
+
const locale = getLocaleOfDocument();
|
391
|
+
switch (locale.language) {
|
392
|
+
case "de":
|
393
|
+
return {
|
394
|
+
username: "Benutzername oder E-Mail",
|
395
|
+
password: "Passwort",
|
396
|
+
login: "Anmelden",
|
397
|
+
forgotPasswordLink: "Passwort vergessen?",
|
398
|
+
mailAddress: "E-Mail-Adresse",
|
399
|
+
requestLink: "Link anfordern",
|
400
|
+
digits: "Code",
|
401
|
+
loginLink: "Anmelden",
|
402
|
+
secondFactor: "Zweiter Faktor Code",
|
403
|
+
sendDigits: "Code senden",
|
404
|
+
sendSecondFactorDigits: "Code senden",
|
405
|
+
resetLoginProcess: "Zurück zum Login",
|
406
|
+
messageEmptyUserName: "Bitte geben Sie Ihren Benutzernamen ein",
|
407
|
+
messageEmptyPassword: "Bitte geben Sie Ihr Passwort ein",
|
408
|
+
messageEmptyBoth:
|
409
|
+
"Bitte geben Sie Ihren Benutzernamen und Ihr Passwort ein",
|
410
|
+
messageEmptyEmail: "Bitte geben Sie Ihre E-Mail-Adresse ein",
|
411
|
+
messageInvalidEmail: "Bitte geben Sie eine gültige E-Mail-Adresse ein",
|
412
|
+
digitsEmpty: "Bitte geben Sie Ihren Code ein",
|
413
|
+
digitsInvalid: "Bitte geben Sie einen gültigen Code ein",
|
414
|
+
messageLoginFailed:
|
415
|
+
"Anmeldung fehlgeschlagen, bitte überprüfen Sie Ihre Eingaben.",
|
416
|
+
messageForbidden:
|
417
|
+
"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.",
|
418
|
+
messageSomethingWentWrong:
|
419
|
+
"Etwas ist schief gelaufen, bitte versuchen Sie es später erneut",
|
420
|
+
messageThisFormIsNotConfigured:
|
421
|
+
"Dieses Formular ist nicht konfiguriert.",
|
422
|
+
messagePasswordResetDisabled:
|
423
|
+
"Diese Funktion funktioniert nicht, da die Zwei-Faktor-Authentifizierung bei Ihrem Konto aktiviert ist.<br>Bitte kontaktieren Sie den Administrator.",
|
424
|
+
};
|
425
|
+
case "es":
|
426
|
+
return {
|
427
|
+
username: "Nombre de usuario o correo electrónico",
|
428
|
+
password: "Contraseña",
|
429
|
+
login: "Iniciar sesión",
|
430
|
+
forgotPasswordLink: "¿Olvidaste tu contraseña?",
|
431
|
+
mailAddress: "Dirección de correo electrónico",
|
432
|
+
requestLink: "Solicitar enlace",
|
433
|
+
digits: "Código",
|
434
|
+
loginLink: "Iniciar sesión",
|
435
|
+
secondFactor: "Código de segundo factor",
|
436
|
+
sendDigits: "Enviar código",
|
437
|
+
sendSecondFactorDigits: "Enviar código",
|
438
|
+
resetLoginProcess: "Volver al inicio de sesión",
|
439
|
+
messageEmptyUserName: "Por favor ingrese su nombre de usuario",
|
440
|
+
messageEmptyPassword: "Por favor ingrese su contraseña",
|
441
|
+
messageEmptyBoth: "Por favor ingrese su nombre de usuario y contraseña",
|
442
|
+
messageEmptyEmail:
|
443
|
+
"Por favor ingrese su dirección de correo electrónico",
|
444
|
+
messageInvalidEmail:
|
445
|
+
"Por favor ingrese una dirección de correo electrónico válida",
|
446
|
+
digitsEmpty: "Por favor ingrese su código",
|
447
|
+
digitsInvalid: "Por favor ingrese un código válido",
|
448
|
+
messageLoginFailed:
|
449
|
+
"Error al iniciar sesión, por favor verifique sus datos.",
|
450
|
+
messageForbidden:
|
451
|
+
"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.",
|
452
|
+
messageSomethingWentWrong:
|
453
|
+
"Algo salió mal, por favor intenta de nuevo más tarde.",
|
454
|
+
messageThisFormIsNotConfigured: "Este formulario no está configurado.",
|
455
|
+
messagePasswordResetDisabled:
|
456
|
+
"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.",
|
457
|
+
};
|
458
|
+
case "zh":
|
459
|
+
return {
|
460
|
+
username: "用户名或电子邮箱",
|
461
|
+
password: "密码",
|
462
|
+
login: "登录",
|
463
|
+
forgotPasswordLink: "忘记密码?",
|
464
|
+
mailAddress: "电子邮件地址",
|
465
|
+
requestLink: "请求链接",
|
466
|
+
digits: "验证码",
|
467
|
+
loginLink: "登录",
|
468
|
+
secondFactor: "二次验证码",
|
469
|
+
sendDigits: "发送验证码",
|
470
|
+
sendSecondFactorDigits: "发送验证码",
|
471
|
+
resetLoginProcess: "返回登录",
|
472
|
+
messageEmptyUserName: "请输入用户名",
|
473
|
+
messageEmptyPassword: "请输入密码",
|
474
|
+
messageEmptyBoth: "请输入用户名和密码",
|
475
|
+
messageEmptyEmail: "请输入电子邮件地址",
|
476
|
+
messageInvalidEmail: "请输入有效的电子邮件地址",
|
477
|
+
digitsEmpty: "请输入验证码",
|
478
|
+
digitsInvalid: "请输入有效的验证码",
|
479
|
+
messageLoginFailed: "登录失败,请检查您的输入。",
|
480
|
+
messageForbidden:
|
481
|
+
"登录成功,但您没有权限。您<b>不能</b>登录。<br>您可以选择其他用户或联系管理员。",
|
482
|
+
messageSomethingWentWrong: "出了点问题,请稍后再试。",
|
483
|
+
messageThisFormIsNotConfigured: "此表单尚未配置。",
|
484
|
+
messagePasswordResetDisabled:
|
485
|
+
"此功能无法使用,因为您的帐户启用了双因素身份验证。请联系管理员。",
|
486
|
+
};
|
487
|
+
|
488
|
+
case "hi":
|
489
|
+
return {
|
490
|
+
username: "उपयो��कर नम य ई-मल",
|
491
|
+
password: "पसवर",
|
492
|
+
login: "लग इन कर",
|
493
|
+
forgotPasswordLink: "पसवर भल गए?",
|
494
|
+
mailAddress: "ई-मल पत",
|
495
|
+
requestLink: "लक क अनरध कर",
|
496
|
+
digits: "कड",
|
497
|
+
loginLink: "लग इन कर",
|
498
|
+
secondFactor: "दसर फकर कड",
|
499
|
+
sendDigits: "कड भज",
|
500
|
+
sendSecondFactorDigits: "कड भज",
|
501
|
+
resetLoginProcess: "लगन पर वपस जए",
|
502
|
+
messageEmptyUserName: "कपय अपन उपयगकर नम दर कर",
|
503
|
+
messageEmptyPassword: "कपय अपन पसवर दर कर",
|
504
|
+
messageEmptyBoth: "कपय अपन उपयगकर नम और पसवर दर कर",
|
505
|
+
messageEmptyEmail: "कपय अपन ई-मल पत दर कर",
|
506
|
+
messageInvalidEmail: "कपय एक वध ई-मल पत दर कर",
|
507
|
+
digitsEmpty: "कपय अपन कड दर कर",
|
508
|
+
digitsInvalid: "कपय एक वध कड दर कर",
|
509
|
+
messageLoginFailed: "लगन वफल हआ, कपय अपन जनकर क जच कर।",
|
510
|
+
messageForbidden:
|
511
|
+
"लगन सफल रह लकन आपक पस अनमत नह ह। आप <b>लगन नह</b> कर सकत।<br>आप दसर उपयगकर चन सकत ह य पशसक स सपर कर सकत ह।",
|
512
|
+
messageSomethingWentWrong: "कछ गलत हआ, कपय बद म पन पयस कर।",
|
513
|
+
messageThisFormIsNotConfigured: "यह फर कनगर नह ह।",
|
514
|
+
messagePasswordResetDisabled:
|
515
|
+
"यह सवध कम नह करत कक आपक खत म द घटक पमणकरण सकम ह। कपय पशसक स सपर कर।",
|
516
|
+
};
|
517
|
+
|
518
|
+
case "bn":
|
519
|
+
return {
|
520
|
+
username: "ইউজরনম ব ই-মইল",
|
521
|
+
password: "পসওযর",
|
522
|
+
login: "লগইন করন",
|
523
|
+
forgotPasswordLink: "পসওযর ভল গছন?",
|
524
|
+
mailAddress: "ই-মইল ঠকন",
|
525
|
+
requestLink: "লক অনরধ করন",
|
526
|
+
digits: "কড",
|
527
|
+
loginLink: "লগইন করন",
|
528
|
+
secondFactor: "দতয ফকর কড",
|
529
|
+
sendDigits: "কড পঠন",
|
530
|
+
sendSecondFactorDigits: "কড পঠন",
|
531
|
+
resetLoginProcess: "লগইন ফর যন",
|
532
|
+
messageEmptyUserName: "দয কর আপনর ইউজরনম লখন",
|
533
|
+
messageEmptyPassword: "দয কর আপনর পসওযর লখন",
|
534
|
+
messageEmptyBoth: "দয কর আপনর ইউজরনম এব পসওযর লখন",
|
535
|
+
messageEmptyEmail: "দয কর আপনর ই-মইল ঠকন লখন",
|
536
|
+
messageInvalidEmail: "দয কর একট বধ ই-মইল ঠকন লখন",
|
537
|
+
digitsEmpty: "দয কর আপনর কড লখন",
|
538
|
+
digitsInvalid: "দয কর একট বধ কড লখন",
|
539
|
+
messageLoginFailed: "লগইন বর হযছ, দয কর আপনর ইনপট পরক করন।",
|
540
|
+
messageForbidden:
|
541
|
+
"লগইন সফল হযছ, কন আপনর অনমত নই। আপন <b>লগইন করত পরবন ন</b>।<br>আপন অন ইউজর নরচন করত পরন অথব অযডমনসটরর সথ যগযগ করত পরন।",
|
542
|
+
messageSomethingWentWrong: "কছ ভল হযছ, দয কর পর আবর চষ করন।",
|
543
|
+
messageThisFormIsNotConfigured: "এই ফরট কনফগর কর হযন।",
|
544
|
+
messagePasswordResetDisabled:
|
545
|
+
"এই ফশনট করকর নয করণ আপনর অযকউন দট ফকর পমণকরণ সকয কর আছ। দয কর পশসকর সথ যগযগ করন।",
|
546
|
+
};
|
547
|
+
|
548
|
+
case "pt": // Portuguese
|
549
|
+
return {
|
550
|
+
username: "Nome de usuário ou e-mail",
|
551
|
+
password: "Senha",
|
552
|
+
login: "Entrar",
|
553
|
+
forgotPasswordLink: "Esqueceu a senha?",
|
554
|
+
mailAddress: "Endereço de e-mail",
|
555
|
+
requestLink: "Solicitar link",
|
556
|
+
digits: "Código",
|
557
|
+
loginLink: "Entrar",
|
558
|
+
secondFactor: "Código do segundo fator",
|
559
|
+
sendDigits: "Enviar código",
|
560
|
+
sendSecondFactorDigits: "Enviar código",
|
561
|
+
resetLoginProcess: "Voltar ao login",
|
562
|
+
messageEmptyUserName: "Por favor, insira seu nome de usuário",
|
563
|
+
messageEmptyPassword: "Por favor, insira sua senha",
|
564
|
+
messageEmptyBoth: "Por favor, insira seu nome de usuário e senha",
|
565
|
+
messageEmptyEmail: "Por favor, insira seu endereço de e-mail",
|
566
|
+
messageInvalidEmail: "Por favor, insira um endereço de e-mail válido",
|
567
|
+
digitsEmpty: "Por favor, insira seu código",
|
568
|
+
digitsInvalid: "Por favor, insira um código válido",
|
569
|
+
messageLoginFailed: "Falha no login, verifique suas informações.",
|
570
|
+
messageForbidden:
|
571
|
+
"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.",
|
572
|
+
messageSomethingWentWrong:
|
573
|
+
"Algo deu errado, tente novamente mais tarde.",
|
574
|
+
messageThisFormIsNotConfigured: "Este formulário não está configurado.",
|
575
|
+
messagePasswordResetDisabled:
|
576
|
+
"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.",
|
577
|
+
};
|
578
|
+
|
579
|
+
case "ru": // Russian
|
580
|
+
return {
|
581
|
+
username: "Имя пользователя или электронная почта",
|
582
|
+
password: "Пароль",
|
583
|
+
login: "Войти",
|
584
|
+
forgotPasswordLink: "Забыли пароль?",
|
585
|
+
mailAddress: "Адрес электронной почты",
|
586
|
+
requestLink: "Запросить ссылку",
|
587
|
+
digits: "Код",
|
588
|
+
loginLink: "Войти",
|
589
|
+
secondFactor: "Код второго фактора",
|
590
|
+
sendDigits: "Отправить код",
|
591
|
+
sendSecondFactorDigits: "Отправить код",
|
592
|
+
resetLoginProcess: "Вернуться к входу",
|
593
|
+
messageEmptyUserName: "Пожалуйста, введите имя пользователя",
|
594
|
+
messageEmptyPassword: "Пожалуйста, введите пароль",
|
595
|
+
messageEmptyBoth: "Пожалуйста, введите имя пользователя и пароль",
|
596
|
+
messageEmptyEmail: "Пожалуйста, введите адрес электронной почты",
|
597
|
+
messageInvalidEmail:
|
598
|
+
"Пожалуйста, введите действительный адрес электронной почты",
|
599
|
+
digitsEmpty: "Пожалуйста, введите код",
|
600
|
+
digitsInvalid: "Пожалуйста, введите действительный код",
|
601
|
+
messageLoginFailed: "Ошибка входа, проверьте введенные данные.",
|
602
|
+
messageForbidden:
|
603
|
+
"Вход выполнен, но у вас нет прав. Вы <b>не можете</b> войти.<br>Вы можете выбрать другого пользователя или связаться с администратором.",
|
604
|
+
messageSomethingWentWrong: "Что-то пошло не так, попробуйте позже.",
|
605
|
+
messageThisFormIsNotConfigured: "Эта форма не настроена.",
|
606
|
+
messagePasswordResetDisabled:
|
607
|
+
"Эта функция не работает, потому что двухфакторная аутентификация<br> включена в вашей учетной записи. Пожалуйста, свяжитесь с администратором.",
|
608
|
+
};
|
609
|
+
|
610
|
+
case "ja": // Japanese
|
611
|
+
return {
|
612
|
+
username: "ユーザー名またはメールアドレス",
|
613
|
+
password: "パスワード",
|
614
|
+
login: "ログイン",
|
615
|
+
forgotPasswordLink: "パスワードを忘れましたか?",
|
616
|
+
mailAddress: "メールアドレス",
|
617
|
+
requestLink: "リンクをリクエスト",
|
618
|
+
digits: "コード",
|
619
|
+
loginLink: "ログイン",
|
620
|
+
secondFactor: "二要素コード",
|
621
|
+
sendDigits: "コードを送信",
|
622
|
+
sendSecondFactorDigits: "コードを送信",
|
623
|
+
resetLoginProcess: "ログインに戻る",
|
624
|
+
messageEmptyUserName: "ユーザー名を入力してください",
|
625
|
+
messageEmptyPassword: "パスワードを入力してください",
|
626
|
+
messageEmptyBoth: "ユーザー名とパスワードを入力してください",
|
627
|
+
messageEmptyEmail: "メールアドレスを入力してください",
|
628
|
+
messageInvalidEmail: "有効なメールアドレスを入力してください",
|
629
|
+
digitsEmpty: "コードを入力してください",
|
630
|
+
digitsInvalid: "有効なコードを入力してください",
|
631
|
+
messageLoginFailed:
|
632
|
+
"ログインに失敗しました。入力内容をご確認ください。",
|
633
|
+
messageForbidden:
|
634
|
+
"ログイン成功しましたが、権限がありません。<b>ログインできません</b>。<br>他のユーザーを選択するか、管理者に連絡してください。",
|
635
|
+
messageSomethingWentWrong:
|
636
|
+
"問題が発生しました。後でもう一度お試しください。",
|
637
|
+
messageThisFormIsNotConfigured: "このフォームは設定されていません。",
|
638
|
+
messagePasswordResetDisabled:
|
639
|
+
"この機能は使用できません。アカウントで二要素認証が有効になっているため、管理者に連絡してください。",
|
640
|
+
};
|
641
|
+
|
642
|
+
case "pa": // Western Punjabi
|
643
|
+
return {
|
644
|
+
username: "ਵਰਤਕਰ ਨਮ ਜ ਈ-ਮਲ",
|
645
|
+
password: "ਪਸਵਰਡ",
|
646
|
+
login: "ਲਗਨ ਕਰ",
|
647
|
+
forgotPasswordLink: "ਪਸਵਰਡ ਭਲ ਗਏ?",
|
648
|
+
mailAddress: "ਈ-ਮਲ ਪਤ",
|
649
|
+
requestLink: "ਲਕ ਦ ਬਨਤ ਕਰ",
|
650
|
+
digits: "ਕਡ",
|
651
|
+
loginLink: "ਲਗਨ ਕਰ",
|
652
|
+
secondFactor: "ਦਜ ਫਕਟਰ ਕਡ",
|
653
|
+
sendDigits: "ਕਡ ਭਜ",
|
654
|
+
sendSecondFactorDigits: "ਕਡ ਭਜ",
|
655
|
+
resetLoginProcess: "ਲਗਨ 'ਤ ਵਪਸ ਜਓ",
|
656
|
+
messageEmptyUserName: "ਕਰਪ ਕਰਕ ਆਪਣ ਵਰਤਕਰ ਨਮ ਦਰਜ ਕਰ",
|
657
|
+
messageEmptyPassword: "ਕਰਪ ਕਰਕ ਆਪਣ ਪਸਵਰਡ ਦਰਜ ਕਰ",
|
658
|
+
messageEmptyBoth: "ਕਰਪ ਕਰਕ ਆਪਣ ਵਰਤਕਰ ਨਮ ਤ ਪਸਵਰਡ ਦਰਜ ਕਰ",
|
659
|
+
messageEmptyEmail: "ਕਰਪ ਕਰਕ ਆਪਣ ਈ-ਮਲ ਪਤ ਦਰਜ ਕਰ",
|
660
|
+
messageInvalidEmail: "ਕਰਪ ਕਰਕ ਇਕ ਵਧ ਈ-ਮਲ ਪਤ ਦਰਜ ਕਰ",
|
661
|
+
digitsEmpty: "ਕਰਪ ਕਰਕ ਆਪਣ ਕਡ ਦਰਜ ਕਰ",
|
662
|
+
digitsInvalid: "ਕਰਪ ਕਰਕ ਇਕ ਵਧ ਕਡ ਦਰਜ ਕਰ",
|
663
|
+
messageLoginFailed: "ਲਗਨ ਅਸਫਲ ਹਇਆ, ਕਰਪ ਕਰਕ ਆਪਣ ਜਣਕਰ ਦ ਜਚ ਕਰ।",
|
664
|
+
messageForbidden:
|
665
|
+
"ਲਗਨ ਸਫਲ ਹਇਆ, ਪਰ ਤਹਡ ਕਲ ਅਧਕਰ ਨਹ ਹਨ। ਤਸ <b>ਲਗਨ ਨਹ</b> ਕਰ ਸਕਦ।<br>ਤਸ ਹਰ ਵਰਤਕਰ ਚਣ सकत ਹ ਜ ਪਰਬਧਕ ਨਲ ਸਪਰਕ ਕਰ ਸਕਦ ਹ।",
|
666
|
+
messageSomethingWentWrong:
|
667
|
+
"ਕਝ ਗਲਤ ਹ ਗਆ, ਕਰਪ ਕਰਕ ਬਅਦ ਵਚ ਮੜ ਕਸਸ ਕਰ।",
|
668
|
+
messageThisFormIsNotConfigured: "ਇਸ ਫਰਮ ਨ ਸਰਚਤ ਨਹ ਕਤ ਗਆ ਹ।",
|
669
|
+
messagePasswordResetDisabled:
|
670
|
+
"ਇਹ ਫਕਸਨ ਕਮ ਨਹ ਕਰਦ ਕਉਕ ਤਹਡ ਖਤ ਵਚ ਦ ਫਕਟਰ ਪਰਮਣਕਰਣ ਸਰਗਰਮ ਹ। ਕਰਪ ਕਰਕ ਪਰਬਧਕ ਨਲ ਸਪਰਕ ਕਰ।",
|
671
|
+
};
|
672
|
+
|
673
|
+
case "mr": // Marathi
|
674
|
+
return {
|
675
|
+
username: "वपरकरनव कव ईमल",
|
676
|
+
password: "सकतशब",
|
677
|
+
login: "पवश कर",
|
678
|
+
forgotPasswordLink: "सकतशब वसरलत क?",
|
679
|
+
mailAddress: "ईमल पत",
|
680
|
+
requestLink: "लकच वनत कर",
|
681
|
+
digits: "कड",
|
682
|
+
loginLink: "पवश कर",
|
683
|
+
secondFactor: "दसर घटक कड",
|
684
|
+
sendDigits: "कड पठव",
|
685
|
+
sendSecondFactorDigits: "कड पठव",
|
686
|
+
resetLoginProcess: "पवशवर परत ज",
|
687
|
+
messageEmptyUserName: "कपय आपल वपरकरनव पवष कर",
|
688
|
+
messageEmptyPassword: "कपय आपल सकतशब पवष कर",
|
689
|
+
messageEmptyBoth: "कपय आपल वपरकरनव आण सकतशब पवष कर",
|
690
|
+
messageEmptyEmail: "कपय आपल ईमल पत पवष कर",
|
691
|
+
messageInvalidEmail: "कपय वध ईमल पत पवष कर",
|
692
|
+
digitsEmpty: "कपय आपल कड पवष कर",
|
693
|
+
digitsInvalid: "कपय वध कड पवष कर",
|
694
|
+
messageLoginFailed: "पवश अयशस, कपय आपल महत तपस.",
|
695
|
+
messageForbidden:
|
696
|
+
"पवश यशस झल, परत आपलकड परवन नह. आपण <b>पवश कर शकत नह</b>.<br>आपण दसर वपरकर नवड शकत कव ववसपकश सपर सध शकत.",
|
697
|
+
messageSomethingWentWrong: "कहतर चकल, कपय नतर पन पयत कर.",
|
698
|
+
messageThisFormIsNotConfigured: "ह फर सरचत कलल नह.",
|
699
|
+
messagePasswordResetDisabled:
|
700
|
+
"य करच कमगर करत नह करण आपल खतत दन घटक पमणकरण सकय कल आह. कपय ववसपकश सपर सध.",
|
701
|
+
};
|
702
|
+
|
703
|
+
case "fr": // French
|
704
|
+
return {
|
705
|
+
username: "Nom d'utilisateur ou e-mail",
|
706
|
+
password: "Mot de passe",
|
707
|
+
login: "Connexion",
|
708
|
+
forgotPasswordLink: "Mot de passe oublié ?",
|
709
|
+
mailAddress: "Adresse e-mail",
|
710
|
+
requestLink: "Demander un lien",
|
711
|
+
digits: "Code",
|
712
|
+
loginLink: "Connexion",
|
713
|
+
secondFactor: "Code du deuxième facteur",
|
714
|
+
sendDigits: "Envoyer le code",
|
715
|
+
sendSecondFactorDigits: "Envoyer le code",
|
716
|
+
resetLoginProcess: "Retour à la connexion",
|
717
|
+
messageEmptyUserName: "Veuillez entrer votre nom d'utilisateur",
|
718
|
+
messageEmptyPassword: "Veuillez entrer votre mot de passe",
|
719
|
+
messageEmptyBoth:
|
720
|
+
"Veuillez entrer votre nom d'utilisateur et votre mot de passe",
|
721
|
+
messageEmptyEmail: "Veuillez entrer votre adresse e-mail",
|
722
|
+
messageInvalidEmail: "Veuillez entrer une adresse e-mail valide",
|
723
|
+
digitsEmpty: "Veuillez entrer votre code",
|
724
|
+
digitsInvalid: "Veuillez entrer un code valide",
|
725
|
+
messageLoginFailed:
|
726
|
+
"Échec de la connexion, veuillez vérifier vos informations.",
|
727
|
+
messageForbidden:
|
728
|
+
"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.",
|
729
|
+
messageSomethingWentWrong:
|
730
|
+
"Une erreur s'est produite, veuillez réessayer plus tard.",
|
731
|
+
messageThisFormIsNotConfigured: "Ce formulaire n'est pas configuré.",
|
732
|
+
messagePasswordResetDisabled:
|
733
|
+
"Cette fonctionnalité ne fonctionne pas car l'authentification à deux facteurs est activée sur<br>votre compte. Veuillez contacter l'administrateur.",
|
734
|
+
};
|
735
|
+
|
736
|
+
case "it": // Italian
|
737
|
+
return {
|
738
|
+
username: "Nome utente o e-mail",
|
739
|
+
password: "Password",
|
740
|
+
login: "Accedi",
|
741
|
+
forgotPasswordLink: "Password dimenticata?",
|
742
|
+
mailAddress: "Indirizzo e-mail",
|
743
|
+
requestLink: "Richiedi link",
|
744
|
+
digits: "Codice",
|
745
|
+
loginLink: "Accedi",
|
746
|
+
secondFactor: "Codice a due fattori",
|
747
|
+
sendDigits: "Invia codice",
|
748
|
+
sendSecondFactorDigits: "Invia codice",
|
749
|
+
resetLoginProcess: "Torna al login",
|
750
|
+
messageEmptyUserName: "Per favore, inserisci il tuo nome utente",
|
751
|
+
messageEmptyPassword: "Per favore, inserisci la tua password",
|
752
|
+
messageEmptyBoth:
|
753
|
+
"Per favore, inserisci il tuo nome utente e la tua password",
|
754
|
+
messageEmptyEmail: "Per favore, inserisci il tuo indirizzo e-mail",
|
755
|
+
messageInvalidEmail: "Per favore, inserisci un indirizzo e-mail valido",
|
756
|
+
digitsEmpty: "Per favore, inserisci il tuo codice",
|
757
|
+
digitsInvalid: "Per favore, inserisci un codice valido",
|
758
|
+
messageLoginFailed: "Accesso fallito, verifica i tuoi dati.",
|
759
|
+
messageForbidden:
|
760
|
+
"Accesso riuscito, ma non hai i permessi. Non puoi accedere.<br>Puoi scegliere un altro account o contattare l'amministratore.",
|
761
|
+
messageSomethingWentWrong:
|
762
|
+
"Qualcosa è andato storto, riprova più tardi.",
|
763
|
+
messageThisFormIsNotConfigured: "Questo modulo non è configurato.",
|
764
|
+
messagePasswordResetDisabled:
|
765
|
+
"Questa funzione non funziona perché l'autenticazione a due<br>fattori è attiva sul tuo account. Contatta l'amministratore.",
|
766
|
+
};
|
767
|
+
|
768
|
+
case "nl": // Dutch
|
769
|
+
return {
|
770
|
+
username: "Gebruikersnaam of e-mail",
|
771
|
+
password: "Wachtwoord",
|
772
|
+
login: "Inloggen",
|
773
|
+
forgotPasswordLink: "Wachtwoord vergeten?",
|
774
|
+
mailAddress: "E-mailadres",
|
775
|
+
requestLink: "Link aanvragen",
|
776
|
+
digits: "Code",
|
777
|
+
loginLink: "Inloggen",
|
778
|
+
secondFactor: "Tweede factor code",
|
779
|
+
sendDigits: "Code verzenden",
|
780
|
+
sendSecondFactorDigits: "Code verzenden",
|
781
|
+
resetLoginProcess: "Terug naar inloggen",
|
782
|
+
messageEmptyUserName: "Voer uw gebruikersnaam in",
|
783
|
+
messageEmptyPassword: "Voer uw wachtwoord in",
|
784
|
+
messageEmptyBoth: "Voer uw gebruikersnaam en wachtwoord in",
|
785
|
+
messageEmptyEmail: "Voer uw e-mailadres in",
|
786
|
+
messageInvalidEmail: "Voer een geldig e-mailadres in",
|
787
|
+
digitsEmpty: "Voer uw code in",
|
788
|
+
digitsInvalid: "Voer een geldige code in",
|
789
|
+
messageLoginFailed: "Inloggen mislukt, controleer uw gegevens.",
|
790
|
+
messageForbidden:
|
791
|
+
"Inloggen geslaagd, maar u heeft geen permissies. U <b>kunt niet</b> inloggen.<br>U kunt een andere gebruiker selecteren of de beheerder contacteren.",
|
792
|
+
messageSomethingWentWrong:
|
793
|
+
"Er is iets fout gegaan, probeer het later opnieuw.",
|
794
|
+
messageThisFormIsNotConfigured: "Dit formulier is niet geconfigureerd.",
|
795
|
+
messagePasswordResetDisabled:
|
796
|
+
"Deze functie werkt niet omdat tweefactorauthenticatie is<br>ingeschakeld op uw account. Neem contact op met de beheerder.",
|
797
|
+
};
|
798
|
+
|
799
|
+
case "sv": // Swedish
|
800
|
+
return {
|
801
|
+
username: "Användarnamn eller e-post",
|
802
|
+
password: "Lösenord",
|
803
|
+
login: "Logga in",
|
804
|
+
forgotPasswordLink: "Glömt lösenord?",
|
805
|
+
mailAddress: "E-postadress",
|
806
|
+
requestLink: "Begär länk",
|
807
|
+
digits: "Kod",
|
808
|
+
loginLink: "Logga in",
|
809
|
+
secondFactor: "Tvåfaktorkod",
|
810
|
+
sendDigits: "Skicka kod",
|
811
|
+
sendSecondFactorDigits: "Skicka kod",
|
812
|
+
resetLoginProcess: "Tillbaka till inloggning",
|
813
|
+
messageEmptyUserName: "Ange ditt användarnamn",
|
814
|
+
messageEmptyPassword: "Ange ditt lösenord",
|
815
|
+
messageEmptyBoth: "Ange ditt användarnamn och lösenord",
|
816
|
+
messageEmptyEmail: "Ange din e-postadress",
|
817
|
+
messageInvalidEmail: "Ange en giltig e-postadress",
|
818
|
+
digitsEmpty: "Ange din kod",
|
819
|
+
digitsInvalid: "Ange en giltig kod",
|
820
|
+
messageLoginFailed:
|
821
|
+
"Inloggning misslyckades, kontrollera dina uppgifter.",
|
822
|
+
messageForbidden:
|
823
|
+
"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.",
|
824
|
+
messageSomethingWentWrong: "Något gick fel, försök igen senare.",
|
825
|
+
messageThisFormIsNotConfigured: "Detta formulär är inte konfigurerat.",
|
826
|
+
messagePasswordResetDisabled:
|
827
|
+
"Denna funktion fungerar inte eftersom tvåfaktorsautentisering är aktiverad på ditt konto. Kontakta administratören.",
|
828
|
+
};
|
829
|
+
|
830
|
+
case "pl": // Polish
|
831
|
+
return {
|
832
|
+
username: "Nazwa użytkownika lub e-mail",
|
833
|
+
password: "Hasło",
|
834
|
+
login: "Zaloguj się",
|
835
|
+
forgotPasswordLink: "Zapomniałeś hasła?",
|
836
|
+
mailAddress: "Adres e-mail",
|
837
|
+
requestLink: "Zażądaj linku",
|
838
|
+
digits: "Kod",
|
839
|
+
loginLink: "Zaloguj się",
|
840
|
+
secondFactor: "Kod drugiego czynnika",
|
841
|
+
sendDigits: "Wyślij kod",
|
842
|
+
sendSecondFactorDigits: "Wyślij kod",
|
843
|
+
resetLoginProcess: "Powrót do logowania",
|
844
|
+
messageEmptyUserName: "Wprowadź swoją nazwę użytkownika",
|
845
|
+
messageEmptyPassword: "Wprowadź swoje hasło",
|
846
|
+
messageEmptyBoth: "Wprowadź swoją nazwę użytkownika i hasło",
|
847
|
+
messageEmptyEmail: "Wprowadź swój adres e-mail",
|
848
|
+
messageInvalidEmail: "Wprowadź prawidłowy adres e-mail",
|
849
|
+
digitsEmpty: "Wprowadź swój kod",
|
850
|
+
digitsInvalid: "Wprowadź prawidłowy kod",
|
851
|
+
messageLoginFailed: "Logowanie nie powiodło się, sprawdź swoje dane.",
|
852
|
+
messageForbidden:
|
853
|
+
"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.",
|
854
|
+
messageSomethingWentWrong:
|
855
|
+
"Coś poszło nie tak, spróbuj ponownie później.",
|
856
|
+
messageThisFormIsNotConfigured:
|
857
|
+
"Ten formularz nie jest skonfigurowany.",
|
858
|
+
messagePasswordResetDisabled:
|
859
|
+
"Ta funkcja nie działa, ponieważ włączona jest autoryzacja dwuetapowa na twoim koncie. Skontaktuj się z administratorem.",
|
860
|
+
};
|
861
|
+
|
862
|
+
case "da": // Danish
|
863
|
+
return {
|
864
|
+
username: "Brugernavn eller e-mail",
|
865
|
+
password: "Adgangskode",
|
866
|
+
login: "Log ind",
|
867
|
+
forgotPasswordLink: "Glemt adgangskode?",
|
868
|
+
mailAddress: "E-mail-adresse",
|
869
|
+
requestLink: "Anmod om link",
|
870
|
+
digits: "Kode",
|
871
|
+
loginLink: "Log ind",
|
872
|
+
secondFactor: "Tofaktorkode",
|
873
|
+
sendDigits: "Send kode",
|
874
|
+
sendSecondFactorDigits: "Send kode",
|
875
|
+
resetLoginProcess: "Tilbage til log ind",
|
876
|
+
messageEmptyUserName: "Indtast dit brugernavn",
|
877
|
+
messageEmptyPassword: "Indtast din adgangskode",
|
878
|
+
messageEmptyBoth: "Indtast dit brugernavn og din adgangskode",
|
879
|
+
messageEmptyEmail: "Indtast din e-mail-adresse",
|
880
|
+
messageInvalidEmail: "Indtast en gyldig e-mail-adresse",
|
881
|
+
digitsEmpty: "Indtast din kode",
|
882
|
+
digitsInvalid: "Indtast en gyldig kode",
|
883
|
+
messageLoginFailed: "Login mislykkedes, kontrollér dine oplysninger.",
|
884
|
+
messageForbidden:
|
885
|
+
"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.",
|
886
|
+
messageSomethingWentWrong: "Noget gik galt, prøv igen senere.",
|
887
|
+
messageThisFormIsNotConfigured: "Denne formular er ikke konfigureret.",
|
888
|
+
messagePasswordResetDisabled:
|
889
|
+
"Denne funktion fungerer ikke, fordi tofaktorautentificering<br>er aktiveret på din konto. Kontakt administratoren.",
|
890
|
+
};
|
891
|
+
|
892
|
+
case "no": // Norwegian
|
893
|
+
return {
|
894
|
+
username: "Brukernavn eller e-post",
|
895
|
+
password: "Passord",
|
896
|
+
login: "Logg inn",
|
897
|
+
forgotPasswordLink: "Glemt passord?",
|
898
|
+
mailAddress: "E-postadresse",
|
899
|
+
requestLink: "Be om lenke",
|
900
|
+
digits: "Kode",
|
901
|
+
loginLink: "Logg inn",
|
902
|
+
secondFactor: "Tofaktorkode",
|
903
|
+
sendDigits: "Send kode",
|
904
|
+
sendSecondFactorDigits: "Send kode",
|
905
|
+
resetLoginProcess: "Tilbake til innlogging",
|
906
|
+
messageEmptyUserName: "Vennligst skriv inn brukernavnet ditt",
|
907
|
+
messageEmptyPassword: "Vennligst skriv inn passordet ditt",
|
908
|
+
messageEmptyBoth: "Vennligst skriv inn brukernavn og passord",
|
909
|
+
messageEmptyEmail: "Vennligst skriv inn e-postadressen din",
|
910
|
+
messageInvalidEmail: "Vennligst skriv inn en gyldig e-postadresse",
|
911
|
+
digitsEmpty: "Vennligst skriv inn koden din",
|
912
|
+
digitsInvalid: "Vennligst skriv inn en gyldig kode",
|
913
|
+
messageLoginFailed:
|
914
|
+
"Innlogging mislyktes, vennligst sjekk informasjonen din.",
|
915
|
+
messageForbidden:
|
916
|
+
"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.",
|
917
|
+
messageSomethingWentWrong:
|
918
|
+
"Noe gikk galt, vennligst prøv igjen senere.",
|
919
|
+
messageThisFormIsNotConfigured: "Dette skjemaet er ikke konfigurert.",
|
920
|
+
messagePasswordResetDisabled:
|
921
|
+
"Denne funksjonen fungerer ikke fordi<br>tofaktorautentisering er aktivert på kontoen din. Kontakt administratoren.",
|
922
|
+
};
|
923
|
+
|
924
|
+
case "cs": // Czech
|
925
|
+
return {
|
926
|
+
username: "Uživatelské jméno nebo e-mail",
|
927
|
+
password: "Heslo",
|
928
|
+
login: "Přihlásit se",
|
929
|
+
forgotPasswordLink: "Zapomněli jste heslo?",
|
930
|
+
mailAddress: "E-mailová adresa",
|
931
|
+
requestLink: "Požádat o odkaz",
|
932
|
+
digits: "Kód",
|
933
|
+
loginLink: "Přihlásit se",
|
934
|
+
secondFactor: "Dvoufázový kód",
|
935
|
+
sendDigits: "Odeslat kód",
|
936
|
+
sendSecondFactorDigits: "Odeslat kód",
|
937
|
+
resetLoginProcess: "Zpět na přihlášení",
|
938
|
+
messageEmptyUserName: "Zadejte své uživatelské jméno",
|
939
|
+
messageEmptyPassword: "Zadejte své heslo",
|
940
|
+
messageEmptyBoth: "Zadejte své uživatelské jméno a heslo",
|
941
|
+
messageEmptyEmail: "Zadejte svou e-mailovou adresu",
|
942
|
+
messageInvalidEmail: "Zadejte platnou e-mailovou adresu",
|
943
|
+
digitsEmpty: "Zadejte svůj kód",
|
944
|
+
digitsInvalid: "Zadejte platný kód",
|
945
|
+
messageLoginFailed: "Přihlášení se nezdařilo, zkontrolujte své údaje.",
|
946
|
+
messageForbidden:
|
947
|
+
"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.",
|
948
|
+
messageSomethingWentWrong: "Něco se pokazilo, zkuste to později.",
|
949
|
+
messageThisFormIsNotConfigured: "Tento formulář není nakonfigurován.",
|
950
|
+
messagePasswordResetDisabled:
|
951
|
+
"Tato funkce nefunguje, protože je na vašem<br>účtu aktivováno dvoufaktorové ověřování. Kontaktujte správce.",
|
952
|
+
};
|
953
|
+
|
954
|
+
default:
|
955
|
+
return {
|
956
|
+
username: "Username or E-Mail",
|
957
|
+
password: "Password",
|
958
|
+
login: "Login",
|
959
|
+
forgotPasswordLink: "Forgot Password?",
|
960
|
+
mailAddress: "E-Mail-Address",
|
961
|
+
requestLink: "Request Link",
|
962
|
+
digits: "Code",
|
963
|
+
loginLink: "Login",
|
964
|
+
secondFactor: "Second Factor Code",
|
965
|
+
sendDigits: "Send Code",
|
966
|
+
sendSecondFactorDigits: "Send Code",
|
967
|
+
resetLoginProcess: "Back to Login",
|
968
|
+
messageEmptyUserName: "Please enter your username",
|
969
|
+
messageEmptyPassword: "Please enter your password",
|
970
|
+
messageEmptyBoth: "Please enter your username and password",
|
971
|
+
messageEmptyEmail: "Please enter your email address",
|
972
|
+
messageInvalidEmail: "Please enter a valid email address",
|
973
|
+
digitsEmpty: "Please enter your code",
|
974
|
+
digitsInvalid: "Please enter a valid code",
|
975
|
+
messageLoginFailed: "Login failed, please check your input.",
|
976
|
+
messageForbidden:
|
977
|
+
"Login was successful, but you have no permission. You <b>cannot</b> login.<br>You can select another user or contact the administrator.",
|
978
|
+
messageSomethingWentWrong:
|
979
|
+
"Something went wrong, please try again later.",
|
980
|
+
messageThisFormIsNotConfigured: "This form is not configured.",
|
981
|
+
messagePasswordResetDisabled:
|
982
|
+
"This function does not work because two-factor<br>authentication is enabled on your account.<br>Please contact the administrator.",
|
983
|
+
};
|
984
|
+
}
|
984
985
|
}
|
985
986
|
|
986
987
|
/**
|
@@ -988,490 +989,498 @@ function getTranslations() {
|
|
988
989
|
* @return {initEventHandler}
|
989
990
|
*/
|
990
991
|
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
|
-
|
992
|
+
const self = this;
|
993
|
+
const element = this[loginElementSymbol];
|
994
|
+
|
995
|
+
const type = "click";
|
996
|
+
|
997
|
+
element.addEventListener(type, function (event) {
|
998
|
+
const callback = self.getOption("actions.click");
|
999
|
+
|
1000
|
+
fireCustomEvent(self, "monster-login-clicked", {
|
1001
|
+
element: self,
|
1002
|
+
});
|
1003
|
+
|
1004
|
+
if (!isFunction(callback)) {
|
1005
|
+
return;
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
const element = findTargetElementFromEvent(
|
1009
|
+
event,
|
1010
|
+
ATTRIBUTE_ROLE,
|
1011
|
+
"control",
|
1012
|
+
);
|
1013
|
+
|
1014
|
+
if (!(element instanceof Node && self.hasNode(element))) {
|
1015
|
+
return;
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
callback.call(self, event);
|
1019
|
+
});
|
1020
|
+
|
1021
|
+
this[forgotPasswordLinkSymbol].addEventListener(type, (event) => {
|
1022
|
+
event.preventDefault();
|
1023
|
+
this[forgotPasswordCollapseSymbol].open();
|
1024
|
+
setTimeout(() => {
|
1025
|
+
this.shadowRoot.querySelector("input[name='email']").focus();
|
1026
|
+
}, 0);
|
1027
|
+
});
|
1028
|
+
|
1029
|
+
this[loginLinkSymbol].addEventListener(type, (event) => {
|
1030
|
+
event.preventDefault();
|
1031
|
+
this[loginCollapseSymbol].open();
|
1032
|
+
|
1033
|
+
setTimeout(() => {
|
1034
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
1035
|
+
}, 0);
|
1036
|
+
});
|
1037
|
+
|
1038
|
+
for (const e of this[resetLoginProcessLinksSymbol]) {
|
1039
|
+
e.addEventListener(type, (event) => {
|
1040
|
+
event.preventDefault();
|
1041
|
+
this[loginCollapseSymbol].open();
|
1042
|
+
setTimeout(() => {
|
1043
|
+
this.shadowRoot.querySelector("input[name='username']").focus();
|
1044
|
+
}, 0);
|
1045
|
+
});
|
1046
|
+
}
|
1047
|
+
|
1048
|
+
this[loginCollapseSymbol].addEventListener("keydown", (event) => {
|
1049
|
+
if (event.key === "Enter") {
|
1050
|
+
setTimeout(() => {
|
1051
|
+
this[loginButtonSymbol].click();
|
1052
|
+
}, 100);
|
1053
|
+
}
|
1054
|
+
});
|
1055
|
+
|
1056
|
+
this[secondFactorCollapseSymbol].addEventListener("keydown", (event) => {
|
1057
|
+
if (event.key === "Enter") {
|
1058
|
+
setTimeout(() => {
|
1059
|
+
this[secondFactorButtonSymbol].click();
|
1060
|
+
}, 100);
|
1061
|
+
}
|
1062
|
+
});
|
1063
|
+
|
1064
|
+
this[forgotPasswordCollapseSymbol].addEventListener("keydown", (event) => {
|
1065
|
+
if (event.key === "Enter") {
|
1066
|
+
setTimeout(() => {
|
1067
|
+
this[requestLinkButtonSymbol].click();
|
1068
|
+
}, 100);
|
1069
|
+
}
|
1070
|
+
});
|
1071
|
+
|
1072
|
+
this[digitsCollapseSymbol].addEventListener("keydown", (event) => {
|
1073
|
+
if (event.key === "Enter") {
|
1074
|
+
setTimeout(() => {
|
1075
|
+
this[digitsButtonSymbol].click();
|
1076
|
+
}, 100);
|
1077
|
+
}
|
1078
|
+
});
|
1079
|
+
|
1080
|
+
this[loginButtonSymbol].setOption("actions.click", (event) => {
|
1081
|
+
// get username and password
|
1082
|
+
const username = this.shadowRoot.querySelector(
|
1083
|
+
"input[name='username']",
|
1084
|
+
).value;
|
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;
|
1475
1484
|
}
|
1476
1485
|
|
1477
1486
|
/**
|
@@ -1479,50 +1488,50 @@ function initEventHandler() {
|
|
1479
1488
|
* @return {void}
|
1480
1489
|
*/
|
1481
1490
|
function initControlReferences() {
|
1482
|
-
|
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
|
-
|
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");
|
1526
1535
|
}
|
1527
1536
|
|
1528
1537
|
/**
|
@@ -1530,8 +1539,8 @@ function initControlReferences() {
|
|
1530
1539
|
* @return {string}
|
1531
1540
|
*/
|
1532
1541
|
function getTemplate() {
|
1533
|
-
|
1534
|
-
|
1542
|
+
// language=HTML
|
1543
|
+
return `
|
1535
1544
|
|
1536
1545
|
<template id="urls">
|
1537
1546
|
<li><a data-monster-attributes="href path:urls.url"
|