mirror of
https://github.com/wekan/wekan.git
synced 2026-01-23 17:56:09 +01:00
Merge remote-tracking branch 'remotes/origin/master' into feature-meteor-files
This commit is contained in:
commit
b378bb55ac
96 changed files with 559 additions and 25 deletions
|
|
@ -53,6 +53,19 @@ Template.userFormsLayout.onCreated(function() {
|
|||
$('.at-pwd-form').hide();
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.call('isDisableRegistration', (_, result) => {
|
||||
if (result) {
|
||||
$('.at-signup-link').hide();
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.call('isDisableForgotPassword', (_, result) => {
|
||||
if (result) {
|
||||
$('.at-pwd-link').hide();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Template.userFormsLayout.onRendered(() => {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@ template(name="webhookSettings")
|
|||
|
||||
template(name="general")
|
||||
ul#registration-setting.setting-detail
|
||||
li
|
||||
a.flex.js-toggle-forgot-password
|
||||
.materialCheckBox(class="{{#if currentSetting.disableForgotPassword}}is-checked{{/if}}")
|
||||
|
||||
span {{_ 'disable-forgot-password'}}
|
||||
li
|
||||
a.flex.js-toggle-registration
|
||||
.materialCheckBox(class="{{#if currentSetting.disableRegistration}}is-checked{{/if}}")
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ BlazeComponent.extendComponent({
|
|||
onCreated() {
|
||||
this.error = new ReactiveVar('');
|
||||
this.loading = new ReactiveVar(false);
|
||||
this.forgotPasswordSetting = new ReactiveVar(true);
|
||||
this.generalSetting = new ReactiveVar(true);
|
||||
this.emailSetting = new ReactiveVar(false);
|
||||
this.accountSetting = new ReactiveVar(false);
|
||||
|
|
@ -56,6 +57,14 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
);
|
||||
},
|
||||
toggleForgotPassword() {
|
||||
this.setLoading(true);
|
||||
const forgotPasswordClosed = this.currentSetting().disableForgotPassword;
|
||||
Settings.update(Settings.findOne()._id, {
|
||||
$set: { disableForgotPassword: !forgotPasswordClosed },
|
||||
});
|
||||
this.setLoading(false);
|
||||
},
|
||||
toggleRegistration() {
|
||||
this.setLoading(true);
|
||||
const registrationClosed = this.currentSetting().disableRegistration;
|
||||
|
|
@ -84,6 +93,7 @@ BlazeComponent.extendComponent({
|
|||
$('.side-menu li.active').removeClass('active');
|
||||
target.parent().addClass('active');
|
||||
const targetID = target.data('id');
|
||||
this.forgotPasswordSetting.set('forgot-password-setting' === targetID);
|
||||
this.generalSetting.set('registration-setting' === targetID);
|
||||
this.emailSetting.set('email-setting' === targetID);
|
||||
this.accountSetting.set('account-setting' === targetID);
|
||||
|
|
@ -267,6 +277,7 @@ BlazeComponent.extendComponent({
|
|||
events() {
|
||||
return [
|
||||
{
|
||||
'click a.js-toggle-forgot-password': this.toggleForgotPassword,
|
||||
'click a.js-toggle-registration': this.toggleRegistration,
|
||||
'click a.js-toggle-tls': this.toggleTLS,
|
||||
'click a.js-setting-menu': this.switchMenu,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue