diff --git a/client/components/main/layouts.jade b/client/components/main/layouts.jade index 197e64645..fcdd8aa4f 100644 --- a/client/components/main/layouts.jade +++ b/client/components/main/layouts.jade @@ -50,9 +50,11 @@ template(name="userFormsLayout") +connectionMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod) if isLegalNoticeLinkExist div#legalNoticeDiv - span {{_ 'acceptance_of_our_legalNotice'}} - a.at-link(href="{{currentSetting.legalNotice}}", target="_blank", rel="noopener noreferrer") + span#legalNoticeSpan {{_ 'acceptance_of_our_legalNotice'}} + a#legalNoticeAtLink.at-link(href="{{currentSetting.legalNotice}}", target="_blank", rel="noopener noreferrer") | {{_ 'legalNotice'}} + if getLegalNoticeWithWritTraduction + div div.at-form-lang select.select-lang.js-userform-set-language each languages diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js index 2ed92989c..8a93cf047 100644 --- a/client/components/main/layouts.js +++ b/client/components/main/layouts.js @@ -86,6 +86,18 @@ Template.userFormsLayout.helpers({ return false; }, + getLegalNoticeWithWritTraduction(){ + let spanLegalNoticeElt = $("#legalNoticeSpan"); + if(spanLegalNoticeElt != null && spanLegalNoticeElt != undefined){ + spanLegalNoticeElt.html(TAPi18n.__('acceptance_of_our_legalNotice', {}, T9n.getLanguage() || 'en')); + } + let atLinkLegalNoticeElt = $("#legalNoticeAtLink"); + if(atLinkLegalNoticeElt != null && atLinkLegalNoticeElt != undefined){ + atLinkLegalNoticeElt.html(TAPi18n.__('legalNotice', {}, T9n.getLanguage() || 'en')); + } + return true; + }, + isLoading() { return Template.instance().isLoading.get(); },