|
@@ -4,6 +4,7 @@ BlazeComponent.extendComponent({
|
|
onCreated() {
|
|
onCreated() {
|
|
this.error = new ReactiveVar('');
|
|
this.error = new ReactiveVar('');
|
|
this.loading = new ReactiveVar(false);
|
|
this.loading = new ReactiveVar(false);
|
|
|
|
+ this.forgotPasswordSetting = new ReactiveVar(true);
|
|
this.generalSetting = new ReactiveVar(true);
|
|
this.generalSetting = new ReactiveVar(true);
|
|
this.emailSetting = new ReactiveVar(false);
|
|
this.emailSetting = new ReactiveVar(false);
|
|
this.accountSetting = 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() {
|
|
toggleRegistration() {
|
|
this.setLoading(true);
|
|
this.setLoading(true);
|
|
const registrationClosed = this.currentSetting().disableRegistration;
|
|
const registrationClosed = this.currentSetting().disableRegistration;
|
|
@@ -84,6 +93,7 @@ BlazeComponent.extendComponent({
|
|
$('.side-menu li.active').removeClass('active');
|
|
$('.side-menu li.active').removeClass('active');
|
|
target.parent().addClass('active');
|
|
target.parent().addClass('active');
|
|
const targetID = target.data('id');
|
|
const targetID = target.data('id');
|
|
|
|
+ this.forgotPasswordSetting.set('forgot-password-setting' === targetID);
|
|
this.generalSetting.set('registration-setting' === targetID);
|
|
this.generalSetting.set('registration-setting' === targetID);
|
|
this.emailSetting.set('email-setting' === targetID);
|
|
this.emailSetting.set('email-setting' === targetID);
|
|
this.accountSetting.set('account-setting' === targetID);
|
|
this.accountSetting.set('account-setting' === targetID);
|
|
@@ -267,6 +277,7 @@ BlazeComponent.extendComponent({
|
|
events() {
|
|
events() {
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
|
|
+ 'click a.js-toggle-forgot-password': this.toggleForgotPassword,
|
|
'click a.js-toggle-registration': this.toggleRegistration,
|
|
'click a.js-toggle-registration': this.toggleRegistration,
|
|
'click a.js-toggle-tls': this.toggleTLS,
|
|
'click a.js-toggle-tls': this.toggleTLS,
|
|
'click a.js-setting-menu': this.switchMenu,
|
|
'click a.js-setting-menu': this.switchMenu,
|