possibility of adding a custom legal notice page url

This commit is contained in:
Emile NDAGIJIMANA 2021-11-25 19:30:49 +01:00
parent 16bb65f7c7
commit 8662fd59fb
9 changed files with 43 additions and 3 deletions

View file

@ -48,6 +48,11 @@ template(name="userFormsLayout")
+Template.dynamic(template=content)
if currentSetting.displayAuthenticationMethod
+connectionMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
if isLegalNoticeLinkExist
div#legalNoticeDiv
span {{_ 'acceptance_of_our_legalNotice'}}
a.at-link(href="{{currentSetting.legalNotice}}", target="_blank", rel="noopener noreferrer")
| {{_ 'legalNotice'}}
div.at-form-lang
select.select-lang.js-userform-set-language
each languages

View file

@ -77,6 +77,15 @@ Template.userFormsLayout.helpers({
// return isSettingDatabaseFctCallDone;
// },
isLegalNoticeLinkExist(){
const currSet = Template.instance().currentSetting.get();
if(currSet && currSet !== undefined && currSet != null){
return currSet.legalNotice !== undefined && currSet.legalNotice.trim() != "";
}
else
return false;
},
isLoading() {
return Template.instance().isLoading.get();
},

View file

@ -545,3 +545,8 @@ a
#isSettingDatabaseCallDone
display: none;
.at-link
color: #17683a;
text-decoration: underline;
text-decoration-color: #17683a;

View file

@ -188,6 +188,10 @@ template(name='layoutSettings')
.title {{_ 'can-invite-if-same-mailDomainName'}}
.form-group
input.wekan-form-control#mailDomainNamevalue(type="text", placeholder="" value="{{currentSetting.mailDomainName}}")
li.layout-form
.title {{_ 'custom-legal-notice-link-url'}}
.form-group
input.wekan-form-control#legalNoticevalue(type="text", placeholder="" value="{{currentSetting.legalNotice}}")
li.layout-form
.title {{_ 'display-authentication-method'}}
.form-group.flex

View file

@ -210,6 +210,11 @@ BlazeComponent.extendComponent({
)
.val()
.trim();
const legalNotice = $(
'#legalNoticevalue',
)
.val()
.trim();
const hideLogoChange = $('input[name=hideLogo]:checked').val() === 'true';
const displayAuthenticationMethod =
$('input[name=displayAuthenticationMethod]:checked').val() === 'true';
@ -234,6 +239,7 @@ BlazeComponent.extendComponent({
spinnerName,
oidcBtnText,
mailDomainName,
legalNotice,
},
});
} catch (e) {

View file

@ -1119,5 +1119,8 @@
"add-organizations": "Add organizations",
"add-organizations-label": "Added organizations are displayed below:",
"remove-organization-from-board": "Are you sure you want to remove this organization from this board ?",
"to-create-organizations-contact-admin": "To create organizations, please contact administrator."
"to-create-organizations-contact-admin": "To create organizations, please contact administrator.",
"custom-legal-notice-link-url": "Custom legal notice page URL",
"acceptance_of_our_legalNotice": "By continuing, you accept our",
"legalNotice": "legal notice"
}

View file

@ -1118,5 +1118,8 @@
"add-organizations": "Ajouter des organisations",
"add-organizations-label": "Les organisations ajoutées sont affichées ci-dessous :",
"remove-organization-from-board": "Voulez-vous vraiment supprimer cette organisation de ce tableau ?",
"to-create-organizations-contact-admin": "Pour créer des organisations, veuillez contacter l'administrateur."
}
"to-create-organizations-contact-admin": "Pour créer des organisations, veuillez contacter l'administrateur.",
"custom-legal-notice-link-url": "URL de la page des mentions légales personnalisées",
"acceptance_of_our_legalNotice": "En continuant, vous acceptez nos",
"legalNotice": "mentions légales"
}

View file

@ -92,6 +92,10 @@ Settings.attachSchema(
type: String,
optional: true,
},
legalNotice: {
type: String,
optional: true,
},
createdAt: {
type: Date,
denyUpdate: true,

View file

@ -26,6 +26,7 @@ Meteor.publish('setting', () => {
spinnerName: 1,
oidcBtnText: 1,
mailDomainName: 1,
legalNotice: 1,
},
},
);