|
125 |
if (message.slice(-1) !== '.') { |
125 |
if (message.slice(-1) !== '.') { |
126 |
message += '.'; |
126 |
message += '.'; |
127 |
} |
127 |
} |
128 |
var title = _('Authentication failure'); |
128 |
var title = info.title || _('Authentication failure'); |
129 |
if (result.password_expired) { |
129 |
if (result.password_expired) { |
130 |
title = _('The password is expired'); |
130 |
title = _('The password is expired'); |
131 |
} else if (result.missing_prompts) { |
131 |
} else if (result.missing_prompts) { |
132 |
title = _('One time password required'); |
132 |
title = _('One time password required'); |
133 |
} |
133 |
} |
134 |
this.set('LoginMessage', '<h1>' + title + '</h1><p>' + message + '</p>'); |
134 |
message = '<h1>' + title + '</h1><p>' + message + '</p>'; |
135 |
} |
135 |
} |
|
|
136 |
this.set('LoginMessage', message); |
136 |
}, |
137 |
}, |
137 |
|
138 |
|
138 |
_setLoginMessageAttr: function(content) { |
139 |
_setLoginMessageAttr: function(content) { |
139 |
this._text.set('content', content); |
140 |
this._text.set('content', content); |
140 |
this._wipeInMessage(); |
141 |
if (content) { |
|
|
142 |
this._wipeInMessage(); |
143 |
} |
141 |
}, |
144 |
}, |
142 |
|
145 |
|
143 |
_wipeInMessage: function() { |
146 |
_wipeInMessage: function() { |
|
370 |
|
373 |
|
371 |
// update info text |
374 |
// update info text |
372 |
var msg = ''; |
375 |
var msg = ''; |
|
|
376 |
var title = ''; |
373 |
|
377 |
|
374 |
// Show warning if connection is unsecured |
378 |
// Show warning if connection is unsecured |
375 |
if (window.location.protocol === 'http:') { |
379 |
if (window.location.protocol === 'http:') { |
376 |
var link = '<a href="https://' + window.location.href.slice(7) + '">'; |
380 |
var link = '<a href="https://' + window.location.href.slice(7) + '">'; |
377 |
msg += '<h1>' + _('Insecure Connection') + '</h1>'; |
381 |
title = _('Insecure Connection'); |
378 |
msg += '<p>' + _('This network connection is not encrypted. All personal or sensitive data will be transmitted in plain text. Please follow %s this link</a> to use a secure SSL connection.', link) + '</p>'; |
382 |
msg = _('This network connection is not encrypted. All personal or sensitive data will be transmitted in plain text. Please follow %s this link</a> to use a secure SSL connection.', link); |
379 |
} |
383 |
} |
380 |
|
384 |
|
381 |
if (has('ie') < 9 || has('ff') < 24) { |
385 |
if (has('ie') < 9 || has('ff') < 24) { |
|
386 |
// IE 8 is also known to cause timeouts when under heavy load |
390 |
// IE 8 is also known to cause timeouts when under heavy load |
387 |
// (presumably because of many async requests to the server |
391 |
// (presumably because of many async requests to the server |
388 |
// during UDM-Form loading) |
392 |
// during UDM-Form loading) |
389 |
msg += '<h1>' + _('Your Browser is outdated') + '</h1>'; |
393 |
title = _('Your Browser is outdated'); |
390 |
msg += '<p>' + _('Your Browser is outdated and should be updated. You may continue to use Univention Management Console but you may experience performance issues and other problems.') + '</p>'; |
394 |
msg = _('Your Browser is outdated and should be updated. You may continue to use Univention Management Console but you may experience performance issues and other problems.') + msg; |
391 |
} |
395 |
} |
392 |
|
396 |
|
393 |
if (tools.status('setupGui')) { |
397 |
if (tools.status('setupGui')) { |
394 |
// user has already logged in before, show message for relogin |
398 |
// user has already logged in before, show message for relogin |
395 |
msg = '<h1>' + _('Session timeout') + '</h1><p>' + _('Your session has been closed due to inactivity. Please login again.') + '</p>'; |
399 |
title = _('Session timeout'); |
|
|
400 |
msg = _('Your session has been closed due to inactivity. Please login again.'); |
396 |
|
401 |
|
397 |
// remove language selection and SSO button after first successful login |
402 |
// remove language selection and SSO button after first successful login |
398 |
query('#umcLoginHeaderRight').style('display', 'none'); |
403 |
query('#umcLoginHeaderRight').style('display', 'none'); |
|
400 |
} |
405 |
} |
401 |
|
406 |
|
402 |
query('#umcLoginMessages').style('display', 'none'); |
407 |
query('#umcLoginMessages').style('display', 'none'); |
403 |
this._text.set('content', msg); |
408 |
this.updateForm({message: msg, title: title}); |
404 |
|
409 |
|
405 |
return this._show(); |
410 |
return this._show(); |
406 |
}, |
411 |
}, |