Browse Source

register: create `renderRegistrationPanel` method

JC Brand 8 years ago
parent
commit
422aaef863
1 changed files with 10 additions and 5 deletions
  1. 10 5
      src/converse-register.js

+ 10 - 5
src/converse-register.js

@@ -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;
                 }
             }
         },