mirror of
https://github.com/wekan/wekan.git
synced 2026-01-29 12:46:09 +01:00
More translations. Added support page to Admin Panel / Settings / Layout.
Thanks to xet7 !
This commit is contained in:
parent
4227377449
commit
a7400dca45
14 changed files with 246 additions and 16 deletions
|
|
@ -375,6 +375,29 @@ template(name='layoutSettings')
|
|||
ul#layout-setting.setting-detail
|
||||
li
|
||||
button.js-all-boards-hide-activities.primary {{_ 'hide-activities-of-all-boards'}}
|
||||
li
|
||||
a(href="/support" style="text-decoration: underline; color: blue;") {{_ 'support'}}
|
||||
li
|
||||
a.flex.js-toggle-support
|
||||
.materialCheckBox(class="{{#if currentSetting.supportPageEnabled}}is-checked{{/if}}")
|
||||
|
||||
span {{_ 'support-page-enabled'}}
|
||||
li
|
||||
.support-content(class="{{#if currentSetting.supportPageEnabled}}{{else}}hide{{/if}}")
|
||||
ul
|
||||
li
|
||||
a.flex.js-toggle-support-public
|
||||
.materialCheckBox(class="{{#if currentSetting.supportPagePublic}}is-checked{{/if}}")
|
||||
|
||||
span {{_ 'public'}}
|
||||
li
|
||||
.title {{_ 'support-title'}}
|
||||
textarea#support-title.wekan-form-control= currentSetting.supportTitle
|
||||
li
|
||||
.title {{_ 'support-content'}}
|
||||
textarea#support-page-text.wekan-form-control= currentSetting.supportPageText
|
||||
li
|
||||
button.js-support-save.primary {{_ 'save'}}
|
||||
li.layout-form
|
||||
.title {{_ 'oidc-button-text'}}
|
||||
.form-group
|
||||
|
|
|
|||
|
|
@ -518,6 +518,45 @@ BlazeComponent.extendComponent({
|
|||
DocHead.setTitle(productName);
|
||||
},
|
||||
|
||||
toggleSupportPage() {
|
||||
this.setLoading(true);
|
||||
const supportPageEnabled = !$('.js-toggle-support .materialCheckBox').hasClass('is-checked');
|
||||
$('.js-toggle-support .materialCheckBox').toggleClass('is-checked');
|
||||
$('.support-content').toggleClass('hide');
|
||||
Settings.update(Settings.findOne()._id, {
|
||||
$set: { supportPageEnabled },
|
||||
});
|
||||
this.setLoading(false);
|
||||
},
|
||||
|
||||
toggleSupportPublic() {
|
||||
this.setLoading(true);
|
||||
const supportPagePublic = !$('.js-toggle-support-public .materialCheckBox').hasClass('is-checked');
|
||||
$('.js-toggle-support-public .materialCheckBox').toggleClass('is-checked');
|
||||
Settings.update(Settings.findOne()._id, {
|
||||
$set: { supportPagePublic },
|
||||
});
|
||||
this.setLoading(false);
|
||||
},
|
||||
|
||||
saveSupportSettings() {
|
||||
this.setLoading(true);
|
||||
const supportTitle = ($('#support-title').val() || '').trim();
|
||||
const supportPageText = ($('#support-page-text').val() || '').trim();
|
||||
try {
|
||||
Settings.update(Settings.findOne()._id, {
|
||||
$set: {
|
||||
supportTitle,
|
||||
supportPageText,
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
return;
|
||||
} finally {
|
||||
this.setLoading(false);
|
||||
}
|
||||
},
|
||||
|
||||
sendSMTPTestEmail() {
|
||||
Meteor.call('sendSMTPTestEmail', (err, ret) => {
|
||||
if (!err && ret) {
|
||||
|
|
@ -546,6 +585,9 @@ BlazeComponent.extendComponent({
|
|||
'click a.js-toggle-hide-card-counter-list': this.toggleHideCardCounterList,
|
||||
'click a.js-toggle-hide-board-member-list': this.toggleHideBoardMemberList,
|
||||
'click button.js-save-layout': this.saveLayout,
|
||||
'click a.js-toggle-support': this.toggleSupportPage,
|
||||
'click a.js-toggle-support-public': this.toggleSupportPublic,
|
||||
'click button.js-support-save': this.saveSupportSettings,
|
||||
'click a.js-toggle-display-authentication-method': this
|
||||
.toggleDisplayAuthenticationMethod,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue