From 82dc0cdd7bdc442c54f598e79117aad5812190bd Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 18 May 2015 14:58:08 +0930 Subject: [PATCH] Fix broken login/signup links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They’re still broken, hoping that https://github.com/babel/babel/issues/1150#issuecomment-102881157 will fix --- framework/core/js/forum/src/components/login-modal.js | 6 +++++- framework/core/js/forum/src/components/signup-modal.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/framework/core/js/forum/src/components/login-modal.js b/framework/core/js/forum/src/components/login-modal.js index 7ae76edf3..a82c48994 100644 --- a/framework/core/js/forum/src/components/login-modal.js +++ b/framework/core/js/forum/src/components/login-modal.js @@ -1,5 +1,6 @@ import Component from 'flarum/component'; import LoadingIndicator from 'flarum/components/loading-indicator'; +import SignupModal from 'flarum/components/signup-modal'; import icon from 'flarum/helpers/icon'; export default class LoginModal extends Component { @@ -33,7 +34,10 @@ export default class LoginModal extends Component { ]), m('div.modal-footer', [ m('p.forgot-password-link', m('a[href=javascript:;]', 'Forgot password?')), - m('p.sign-up-link', ['Don\'t have an account? ', m('a[href=javascript:;]', {onclick: app.signup}, 'Sign Up')]) + m('p.sign-up-link', [ + 'Don\'t have an account? ', + m('a[href=javascript:;]', {onclick: () => app.modal.show(new SignupModal())}, 'Sign Up') + ]) ]) ]) ]), diff --git a/framework/core/js/forum/src/components/signup-modal.js b/framework/core/js/forum/src/components/signup-modal.js index e050d3a6a..18412ac85 100644 --- a/framework/core/js/forum/src/components/signup-modal.js +++ b/framework/core/js/forum/src/components/signup-modal.js @@ -1,5 +1,6 @@ import Component from 'flarum/component'; import LoadingIndicator from 'flarum/components/loading-indicator'; +import LoginModal from 'flarum/components/login-modal'; import icon from 'flarum/helpers/icon'; import avatar from 'flarum/helpers/avatar'; @@ -40,7 +41,10 @@ export default class SignupModal extends Component { ]) ]), m('div.modal-footer', [ - m('p.log-in-link', ['Already have an account? ', m('a[href=javascript:;]', {onclick: app.login}, 'Log In')]) + m('p.log-in-link', [ + 'Already have an account? ', + m('a[href=javascript:;]', {onclick: () => app.modal.show(new LoginModal())}, 'Log In') + ]) ]) ]) ]),