mirror of
https://github.com/wekan/wekan.git
synced 2026-02-03 07:01:47 +01:00
Custom Logo for Login and Top Left Corner. Optional link when clicking logo. Settings at Admin Panel / Layout.
Thanks to xet7 ! Fixes #1493, fixes #2721, fixes #2681, fixes #1583, fixes #1196, fixes #336, fixes wekan/wekan-snap#130
This commit is contained in:
parent
7db08082bc
commit
a7c3317ed6
10 changed files with 116 additions and 20 deletions
|
|
@ -163,13 +163,6 @@ template(name='announcementSettings')
|
|||
|
||||
template(name='layoutSettings')
|
||||
ul#layout-setting.setting-detail
|
||||
//li.layout-form
|
||||
.title {{_ 'hide-logo'}}
|
||||
.form-group.flex
|
||||
input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}")
|
||||
span {{_ 'yes'}}
|
||||
input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}")
|
||||
span {{_ 'no'}}
|
||||
li.layout-form
|
||||
.title {{_ 'display-authentication-method'}}
|
||||
.form-group.flex
|
||||
|
|
@ -184,10 +177,32 @@ template(name='layoutSettings')
|
|||
.title {{_ 'custom-product-name'}}
|
||||
.form-group
|
||||
input.wekan-form-control#product-name(type="text", placeholder="" value="{{currentSetting.productName}}")
|
||||
li.layout-form
|
||||
.title {{_ 'hide-logo'}}
|
||||
.form-group.flex
|
||||
input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}")
|
||||
span {{_ 'yes'}}
|
||||
input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}")
|
||||
span {{_ 'no'}}
|
||||
li.layout-form
|
||||
.title {{_ 'custom-login-logo-image-url'}}
|
||||
.form-group
|
||||
input.wekan-form-control#custom-login-logo-image-url(type="text", placeholder="" value="{{currentSetting.customLoginLogoImageUrl}}")
|
||||
li.layout-form
|
||||
.title {{_ 'custom-login-logo-target-url'}}
|
||||
.form-group
|
||||
input.wekan-form-control#custom-login-logo-target-url(type="text", placeholder="" value="{{currentSetting.customLoginLogoTargetUrl}}")
|
||||
li.layout-form
|
||||
.title {{_ 'custom-top-left-corner-logo-image-url'}}
|
||||
.form-group
|
||||
input.wekan-form-control#custom-top-left-corner-logo-image-url(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoImageUrl}}")
|
||||
li.layout-form
|
||||
.title {{_ 'custom-top-left-corner-logo-target-url'}}
|
||||
.form-group
|
||||
input.wekan-form-control#custom-top-left-corner-logo-target-url(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoTargetUrl}}")
|
||||
li
|
||||
button.js-save-layout.primary {{_ 'save'}}
|
||||
|
||||
|
||||
template(name='selectAuthenticationMethod')
|
||||
select#defaultAuthenticationMethod
|
||||
each authentications
|
||||
|
|
|
|||
|
|
@ -167,6 +167,22 @@ BlazeComponent.extendComponent({
|
|||
const productName = $('#product-name')
|
||||
.val()
|
||||
.trim();
|
||||
const customLoginLogoImageUrl = $('#custom-login-logo-image-url')
|
||||
.val()
|
||||
.trim();
|
||||
const customLoginLogoTargetUrl = $('#custom-login-logo-target-url')
|
||||
.val()
|
||||
.trim();
|
||||
const customTopLeftCornerLogoImageUrl = $(
|
||||
'#custom-top-left-corner-logo-image-url',
|
||||
)
|
||||
.val()
|
||||
.trim();
|
||||
const customTopLeftCornerLogoTargetUrl = $(
|
||||
'#custom-top-left-corner-logo-target-url',
|
||||
)
|
||||
.val()
|
||||
.trim();
|
||||
const hideLogoChange = $('input[name=hideLogo]:checked').val() === 'true';
|
||||
const displayAuthenticationMethod =
|
||||
$('input[name=displayAuthenticationMethod]:checked').val() === 'true';
|
||||
|
|
@ -177,6 +193,10 @@ BlazeComponent.extendComponent({
|
|||
$set: {
|
||||
productName,
|
||||
hideLogo: hideLogoChange,
|
||||
customLoginLogoImageUrl,
|
||||
customLoginLogoTargetUrl,
|
||||
customTopLeftCornerLogoImageUrl,
|
||||
customTopLeftCornerLogoTargetUrl,
|
||||
displayAuthenticationMethod,
|
||||
defaultAuthenticationMethod,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue