mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
[Admin panel / Settings / Layout] Customize OIDC button text
This commit is contained in:
parent
0c121a5894
commit
9defed2680
7 changed files with 25 additions and 1 deletions
|
|
@ -28,6 +28,12 @@ Template.userFormsLayout.onCreated(function() {
|
||||||
Meteor.subscribe('setting', {
|
Meteor.subscribe('setting', {
|
||||||
onReady() {
|
onReady() {
|
||||||
templateInstance.currentSetting.set(Settings.findOne());
|
templateInstance.currentSetting.set(Settings.findOne());
|
||||||
|
let currSetting = templateInstance.currentSetting.curValue;
|
||||||
|
let oidcBtnElt = $("#at-oidc");
|
||||||
|
if(currSetting && currSetting !== undefined && currSetting.oidcBtnText !== undefined && oidcBtnElt != null && oidcBtnElt != undefined){
|
||||||
|
let htmlvalue = "<i class='fa fa-oidc'></i>" + currSetting.oidcBtnText;
|
||||||
|
oidcBtnElt.html(htmlvalue);
|
||||||
|
}
|
||||||
return this.stop();
|
return this.stop();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,10 @@ template(name='announcementSettings')
|
||||||
|
|
||||||
template(name='layoutSettings')
|
template(name='layoutSettings')
|
||||||
ul#layout-setting.setting-detail
|
ul#layout-setting.setting-detail
|
||||||
|
li.layout-form
|
||||||
|
.title {{_ 'oidc-button-text'}}
|
||||||
|
.form-group
|
||||||
|
input.wekan-form-control#oidcBtnTextvalue(type="text", placeholder="" value="{{currentSetting.oidcBtnText}}")
|
||||||
li.layout-form
|
li.layout-form
|
||||||
.title {{_ 'display-authentication-method'}}
|
.title {{_ 'display-authentication-method'}}
|
||||||
.form-group.flex
|
.form-group.flex
|
||||||
|
|
|
||||||
|
|
@ -199,6 +199,12 @@ BlazeComponent.extendComponent({
|
||||||
)
|
)
|
||||||
.val()
|
.val()
|
||||||
.trim();
|
.trim();
|
||||||
|
|
||||||
|
const oidcBtnText = $(
|
||||||
|
'#oidcBtnTextvalue',
|
||||||
|
)
|
||||||
|
.val()
|
||||||
|
.trim();
|
||||||
const hideLogoChange = $('input[name=hideLogo]:checked').val() === 'true';
|
const hideLogoChange = $('input[name=hideLogo]:checked').val() === 'true';
|
||||||
const displayAuthenticationMethod =
|
const displayAuthenticationMethod =
|
||||||
$('input[name=displayAuthenticationMethod]:checked').val() === 'true';
|
$('input[name=displayAuthenticationMethod]:checked').val() === 'true';
|
||||||
|
|
@ -221,6 +227,7 @@ BlazeComponent.extendComponent({
|
||||||
defaultAuthenticationMethod,
|
defaultAuthenticationMethod,
|
||||||
automaticLinkedUrlSchemes,
|
automaticLinkedUrlSchemes,
|
||||||
spinnerName,
|
spinnerName,
|
||||||
|
oidcBtnText,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
|
|
@ -828,6 +828,7 @@
|
||||||
"error-undefined": "Something went wrong",
|
"error-undefined": "Something went wrong",
|
||||||
"error-ldap-login": "An error occurred while trying to login",
|
"error-ldap-login": "An error occurred while trying to login",
|
||||||
"display-authentication-method": "Display Authentication Method",
|
"display-authentication-method": "Display Authentication Method",
|
||||||
|
"oidc-button-text": "Customize the OIDC button text",
|
||||||
"default-authentication-method": "Default Authentication Method",
|
"default-authentication-method": "Default Authentication Method",
|
||||||
"duplicate-board": "Duplicate Board",
|
"duplicate-board": "Duplicate Board",
|
||||||
"org-number": "The number of organizations is: ",
|
"org-number": "The number of organizations is: ",
|
||||||
|
|
|
||||||
|
|
@ -827,6 +827,7 @@
|
||||||
"add-custom-html-before-body-end": "Ajouter le HTML personnalisé avant la fin du </body>",
|
"add-custom-html-before-body-end": "Ajouter le HTML personnalisé avant la fin du </body>",
|
||||||
"error-undefined": "Une erreur inconnue s'est produite",
|
"error-undefined": "Une erreur inconnue s'est produite",
|
||||||
"error-ldap-login": "Une erreur s'est produite lors de la tentative de connexion",
|
"error-ldap-login": "Une erreur s'est produite lors de la tentative de connexion",
|
||||||
|
"oidc-button-text": "Personnaliser le texte du bouton OIDC",
|
||||||
"display-authentication-method": "Afficher la méthode d'authentification",
|
"display-authentication-method": "Afficher la méthode d'authentification",
|
||||||
"default-authentication-method": "Méthode d'authentification par défaut",
|
"default-authentication-method": "Méthode d'authentification par défaut",
|
||||||
"duplicate-board": "Dupliquer le tableau",
|
"duplicate-board": "Dupliquer le tableau",
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,10 @@ Settings.attachSchema(
|
||||||
type: String,
|
type: String,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
|
oidcBtnText: {
|
||||||
|
type: String,
|
||||||
|
optional: true,
|
||||||
|
},
|
||||||
createdAt: {
|
createdAt: {
|
||||||
type: Date,
|
type: Date,
|
||||||
denyUpdate: true,
|
denyUpdate: true,
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ Meteor.publish('setting', () => {
|
||||||
displayAuthenticationMethod: 1,
|
displayAuthenticationMethod: 1,
|
||||||
defaultAuthenticationMethod: 1,
|
defaultAuthenticationMethod: 1,
|
||||||
spinnerName: 1,
|
spinnerName: 1,
|
||||||
|
oidcBtnText: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue