mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Allow/disallow signup per config
This commit is contained in:
@@ -35,13 +35,15 @@ export default class HeaderSecondary extends Component {
|
||||
items.add('notifications', NotificationsDropdown.component());
|
||||
items.add('session', SessionDropdown.component());
|
||||
} else {
|
||||
items.add('signUp',
|
||||
Button.component({
|
||||
children: app.trans('core.sign_up'),
|
||||
className: 'Button Button--link',
|
||||
onclick: () => app.modal.show(new SignUpModal())
|
||||
})
|
||||
);
|
||||
if (app.forum.attribute('allowSignUp')) {
|
||||
items.add('signUp',
|
||||
Button.component({
|
||||
children: app.trans('core.sign_up'),
|
||||
className: 'Button Button--link',
|
||||
onclick: () => app.modal.show(new SignUpModal())
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
items.add('logIn',
|
||||
Button.component({
|
||||
|
@@ -71,10 +71,12 @@ export default class LogInModal extends Modal {
|
||||
<p className="LogInModal-forgotPassword">
|
||||
<a onclick={this.forgotPassword.bind(this)}>{app.trans('core.forgot_password_link')}</a>
|
||||
</p>
|
||||
<p className="LogInModal-signUp">
|
||||
{app.trans('core.before_sign_up_link')}{' '}
|
||||
<a onclick={this.signUp.bind(this)}>{app.trans('core.sign_up')}</a>
|
||||
</p>
|
||||
{app.forum.attribute('allowSignUp') ? (
|
||||
<p className="LogInModal-signUp">
|
||||
{app.trans('core.before_sign_up_link')}{' '}
|
||||
<a onclick={this.signUp.bind(this)}>{app.trans('core.sign_up')}</a>
|
||||
</p>
|
||||
) : ''}
|
||||
</div>
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user