|
@@ -24,12 +24,18 @@ function Dialog(callback, obtainSession) {
|
24
|
24
|
|
25
|
25
|
var message = '<h2 data-i18n="dialog.passwordRequired">';
|
26
|
26
|
message += APP.translation.translateString("dialog.passwordRequired");
|
|
27
|
+ // ++__authdomain__
|
27
|
28
|
message += '</h2>' +
|
28
|
|
- '<input name="username" type="text" ' +
|
29
|
|
- 'placeholder="user@domain.net" autofocus>' +
|
30
|
|
- '<input name="password" ' +
|
|
29
|
+ '<input name="username" type="text" ';
|
|
30
|
+ if (config.hosts.authdomain) {
|
|
31
|
+ message += 'placeholder="user identity" autofocus>';
|
|
32
|
+ } else {
|
|
33
|
+ message += 'placeholder="user@domain.net" autofocus>';
|
|
34
|
+ }
|
|
35
|
+ message += '<input name="password" ' +
|
31
|
36
|
'type="password" data-i18n="[placeholder]dialog.userPassword"' +
|
32
|
37
|
' placeholder="user password">';
|
|
38
|
+ // --__authdomain__
|
33
|
39
|
|
34
|
40
|
var okButton = APP.translation.generateTranslationHTML("dialog.Ok");
|
35
|
41
|
|
|
@@ -50,6 +56,16 @@ function Dialog(callback, obtainSession) {
|
50
|
56
|
var password = f.password;
|
51
|
57
|
if (jid && password) {
|
52
|
58
|
stop = false;
|
|
59
|
+ //++__authdomain__ complete jid by appending @<domain> if no @ was found in jid
|
|
60
|
+ if (jid.indexOf("@") < 0) {
|
|
61
|
+ jid = jid.concat('@');
|
|
62
|
+ if (config.hosts.authdomain) {
|
|
63
|
+ jid += config.hosts.authdomain;
|
|
64
|
+ } else {
|
|
65
|
+ jid += config.hosts.domain;
|
|
66
|
+ }
|
|
67
|
+ }
|
|
68
|
+ // --__authdomain__
|
53
|
69
|
connection.reset();
|
54
|
70
|
connDialog.goToState('connecting');
|
55
|
71
|
connection.connect(jid, password, stateHandler);
|
|
@@ -225,4 +241,4 @@ var LoginDialog = {
|
225
|
241
|
}
|
226
|
242
|
};
|
227
|
243
|
|
228
|
|
-module.exports = LoginDialog;
|
|
244
|
+module.exports = LoginDialog;
|