register: create renderRegistrationPanel method

This commit is contained in:
JC Brand 2017-06-13 19:11:09 +02:00
parent 43408a6128
commit 422aaef863

View File

@ -72,11 +72,7 @@
return result;
},
renderLoginPanel: function () {
/* Also render a registration panel, when rendering the
* login panel.
*/
this.__super__.renderLoginPanel.apply(this, arguments);
renderRegistrationPanel: function () {
var _converse = this.__super__._converse;
if (_converse.allow_registration) {
this.registerpanel = new _converse.RegisterPanel({
@ -86,6 +82,15 @@
this.registerpanel.render().$el.addClass('hidden');
}
return this;
},
renderLoginPanel: function () {
/* Also render a registration panel, when rendering the
* login panel.
*/
this.__super__.renderLoginPanel.apply(this, arguments);
this.renderRegistrationPanel();
return this;
}
}
},