Don't use ids for the login form inputs
This commit is contained in:
parent
d5df785a2a
commit
3b62580ccd
12
converse.js
12
converse.js
@ -2570,9 +2570,9 @@
|
|||||||
template: _.template(
|
template: _.template(
|
||||||
'<form id="converse-login">' +
|
'<form id="converse-login">' +
|
||||||
'<label>'+__('XMPP/Jabber Username:')+'</label>' +
|
'<label>'+__('XMPP/Jabber Username:')+'</label>' +
|
||||||
'<input type="text" id="jid">' +
|
'<input type="username" name="jid">' +
|
||||||
'<label>'+__('Password:')+'</label>' +
|
'<label>'+__('Password:')+'</label>' +
|
||||||
'<input type="password" id="password">' +
|
'<input type="password" name="password">' +
|
||||||
'<input class="login-submit" type="submit" value="'+__('Log In')+'">' +
|
'<input class="login-submit" type="submit" value="'+__('Log In')+'">' +
|
||||||
'</form">'),
|
'</form">'),
|
||||||
|
|
||||||
@ -2597,7 +2597,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
initialize: function (cfg) {
|
initialize: function (cfg) {
|
||||||
cfg.$parent.append(this.$el.html(this.template()));
|
cfg.$parent.html(this.$el.html(this.template()));
|
||||||
this.$tabs = cfg.$parent.parent().find('#controlbox-tabs');
|
this.$tabs = cfg.$parent.parent().find('#controlbox-tabs');
|
||||||
this.model.on('connection-fail', function () { this.showConnectButton(); }, this);
|
this.model.on('connection-fail', function () { this.showConnectButton(); }, this);
|
||||||
this.model.on('auth-fail', function () { this.showConnectButton(); }, this);
|
this.model.on('auth-fail', function () { this.showConnectButton(); }, this);
|
||||||
@ -2610,11 +2610,10 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
authenticate: function (ev) {
|
authenticate: function (ev) {
|
||||||
ev.preventDefault();
|
|
||||||
var $form = $(ev.target),
|
var $form = $(ev.target),
|
||||||
$jid_input = $form.find('input#jid'),
|
$jid_input = $form.find('input[name=jid]'),
|
||||||
jid = $jid_input.val(),
|
jid = $jid_input.val(),
|
||||||
$pw_input = $form.find('input#password'),
|
$pw_input = $form.find('input[name=password]'),
|
||||||
password = $pw_input.val(),
|
password = $pw_input.val(),
|
||||||
$bsu_input = null,
|
$bsu_input = null,
|
||||||
errors = false;
|
errors = false;
|
||||||
@ -2637,6 +2636,7 @@
|
|||||||
}
|
}
|
||||||
if (errors) { return; }
|
if (errors) { return; }
|
||||||
this.connect($form, jid, password);
|
this.connect($form, jid, password);
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
remove: function () {
|
remove: function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user