summaryrefslogtreecommitdiffstats
path: root/client/components/settings/settingBody.js
diff options
context:
space:
mode:
authornztqa <nztqa@users.noreply.github.com>2017-08-07 17:40:50 +0900
committernztqa <nztqa@users.noreply.github.com>2017-08-07 17:40:50 +0900
commit6a10257fd7230d08d9a64fc4877e85972375498d (patch)
tree263bed8ce542bda6f31f09eb521362c76b3c3440 /client/components/settings/settingBody.js
parent57219df16afbc0c512e15ed9801308591b41d318 (diff)
downloadwekan-6a10257fd7230d08d9a64fc4877e85972375498d.tar.gz
wekan-6a10257fd7230d08d9a64fc4877e85972375498d.tar.bz2
wekan-6a10257fd7230d08d9a64fc4877e85972375498d.zip
Add change email address
Set allow email change in admin panel
Diffstat (limited to 'client/components/settings/settingBody.js')
-rw-r--r--client/components/settings/settingBody.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/client/components/settings/settingBody.js b/client/components/settings/settingBody.js
index f96312a5..a2993426 100644
--- a/client/components/settings/settingBody.js
+++ b/client/components/settings/settingBody.js
@@ -1,5 +1,6 @@
Meteor.subscribe('setting');
Meteor.subscribe('mailServer');
+Meteor.subscribe('accountSettings');
BlazeComponent.extendComponent({
onCreated() {
@@ -7,6 +8,7 @@ BlazeComponent.extendComponent({
this.loading = new ReactiveVar(false);
this.generalSetting = new ReactiveVar(true);
this.emailSetting = new ReactiveVar(false);
+ this.accountSetting = new ReactiveVar(false);
},
setError(error) {
@@ -62,6 +64,7 @@ BlazeComponent.extendComponent({
const targetID = target.data('id');
this.generalSetting.set('registration-setting' === targetID);
this.emailSetting.set('email-setting' === targetID);
+ this.accountSetting.set('account-setting' === targetID);
}
},
@@ -130,3 +133,22 @@ BlazeComponent.extendComponent({
}];
},
}).register('setting');
+
+BlazeComponent.extendComponent({
+ saveAllowEmailChange() {
+ const allowEmailChange = ($('input[name=allowEmailChange]:checked').val() === 'true');
+ AccountSettings.update('accounts-allowEmailChange', {
+ $set: { 'booleanValue': allowEmailChange },
+ });
+ },
+
+ allowEmailChange() {
+ return AccountSettings.findOne('accounts-allowEmailChange').booleanValue;
+ },
+
+ events() {
+ return [{
+ 'click button.js-accounts-save': this.saveAllowEmailChange,
+ }];
+ },
+}).register('accountSettings');