diff options
Diffstat (limited to 'client/components/settings')
-rw-r--r-- | client/components/settings/settingBody.jade | 8 | ||||
-rw-r--r-- | client/components/settings/settingBody.js | 10 |
2 files changed, 16 insertions, 2 deletions
diff --git a/client/components/settings/settingBody.jade b/client/components/settings/settingBody.jade index a05be1c6..bc6e0f50 100644 --- a/client/components/settings/settingBody.jade +++ b/client/components/settings/settingBody.jade @@ -135,9 +135,15 @@ template(name='announcementSettings') template(name='layoutSettings') ul#layout-setting.setting-detail li.layout-form + .title {{_ 'hide-logo'}} + .form-group.flex + input.form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}") + span {{_ 'yes'}} + input.form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}") + span {{_ 'no'}} + 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 4ad65400..5bebc8d0 100644 --- a/client/components/settings/settingBody.js +++ b/client/components/settings/settingBody.js @@ -59,6 +59,9 @@ BlazeComponent.extendComponent({ toggleTLS() { $('#mail-server-tls').toggleClass('is-checked'); }, + toggleHideLogo() { + $('#hide-logo').toggleClass('is-checked'); + }, switchMenu(event) { const target = $(event.target); if (!target.hasClass('active')) { @@ -135,11 +138,15 @@ BlazeComponent.extendComponent({ this.setLoading(true); $('li').removeClass('has-error'); + const productName = $('#product-name').val().trim(); + const hideLogoChange = ($('input[name=hideLogo]:checked').val() === 'true'); + try { - const productName = $('#product-name').val().trim(); + Settings.update(Settings.findOne()._id, { $set: { productName, + hideLogo: hideLogoChange, }, }); } catch (e) { @@ -175,6 +182,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 a.js-toggle-hide-logo': this.toggleHideLogo, 'click button.js-save-layout': this.saveLayout, }]; }, |