summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/components/settings/settingBody.jade16
-rw-r--r--client/components/settings/settingBody.js22
-rw-r--r--client/components/settings/settingBody.styl3
3 files changed, 39 insertions, 2 deletions
diff --git a/client/components/settings/settingBody.jade b/client/components/settings/settingBody.jade
index dcf71f4d..a05be1c6 100644
--- a/client/components/settings/settingBody.jade
+++ b/client/components/settings/settingBody.jade
@@ -16,6 +16,8 @@ template(name="setting")
a.js-setting-menu(data-id="account-setting") {{_ 'accounts'}}
li
a.js-setting-menu(data-id="announcement-setting") {{_ 'admin-announcement'}}
+ li
+ a.js-setting-menu(data-id="layout-setting") {{_ 'layout'}}
.main-body
if loading.get
+spinner
@@ -27,6 +29,8 @@ template(name="setting")
+accountSettings
else if announcementSetting.get
+announcementSettings
+ else if layoutSetting.get
+ +layoutSettings
template(name="general")
ul#registration-setting.setting-detail
@@ -72,7 +76,7 @@ template(name='email')
li.smtp-form
.title {{_ 'smtp-password'}}
.form-group
- input.form-control#mail-server-password(type="text", placeholder="{{_ 'password'}}" value="")
+ input.form-control#mail-server-password(type="password", placeholder="{{_ 'password'}}" value="{{currentSetting.mailServer.password}}")
li.smtp-form
.title {{_ 'smtp-tls'}}
.form-group
@@ -127,3 +131,13 @@ template(name='announcementSettings')
textarea#admin-announcement.form-control= currentSetting.body
li
button.js-announcement-save.primary {{_ 'save'}}
+
+template(name='layoutSettings')
+ ul#layout-setting.setting-detail
+ li.layout-form
+ .title {{_ 'custom-product-name'}}
+ .form-group
+ input.form-control#product-name(type="text", placeholder="Wekan" value="{{currentSetting.productName}}")
+
+ li
+ button.js-save-layout.primary {{_ 'save'}}
diff --git a/client/components/settings/settingBody.js b/client/components/settings/settingBody.js
index 7230d893..0ff4f99c 100644
--- a/client/components/settings/settingBody.js
+++ b/client/components/settings/settingBody.js
@@ -6,6 +6,7 @@ BlazeComponent.extendComponent({
this.emailSetting = new ReactiveVar(false);
this.accountSetting = new ReactiveVar(false);
this.announcementSetting = new ReactiveVar(false);
+ this.layoutSetting = new ReactiveVar(false);
Meteor.subscribe('setting');
Meteor.subscribe('mailServer');
@@ -68,6 +69,7 @@ BlazeComponent.extendComponent({
this.emailSetting.set('email-setting' === targetID);
this.accountSetting.set('account-setting' === targetID);
this.announcementSetting.set('announcement-setting' === targetID);
+ this.layoutSetting.set('layout-setting' === targetID);
}
},
@@ -129,6 +131,25 @@ BlazeComponent.extendComponent({
},
+ saveLayout() {
+ this.setLoading(true);
+ $('li').removeClass('has-error');
+
+ try {
+ const productName = $('#product-name').val().trim();
+ Settings.update(Settings.findOne()._id, {
+ $set: {
+ 'productName': productName,
+ },
+ });
+ } catch (e) {
+ return;
+ } finally {
+ this.setLoading(false);
+ }
+
+ },
+
sendSMTPTestEmail() {
Meteor.call('sendSMTPTestEmail', (err, ret) => {
if (!err && ret) { /* eslint-disable no-console */
@@ -154,6 +175,7 @@ BlazeComponent.extendComponent({
'click button.js-email-invite': this.inviteThroughEmail,
'click button.js-save': this.saveMailServerInfo,
'click button.js-send-smtp-test-email': this.sendSMTPTestEmail,
+ 'click button.js-save-layout': this.saveLayout,
}];
},
}).register('setting');
diff --git a/client/components/settings/settingBody.styl b/client/components/settings/settingBody.styl
index fec64cee..7f8bd4c0 100644
--- a/client/components/settings/settingBody.styl
+++ b/client/components/settings/settingBody.styl
@@ -66,7 +66,8 @@
padding: 0 0.5rem
.admin-announcement,
- .invite-people
+ .invite-people,
+ .layout
padding-left 20px;
li
min-width: 500px;