summaryrefslogtreecommitdiffstats
path: root/packages/meteor-useraccounts-core/lib/templates_helpers/at_terms_link.js
blob: 0ada35cbda72215c1033c166e5d845ce98500499 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
AT.prototype.atTermsLinkHelpers = {
    disabled: function() {
        return AccountsTemplates.disabled();
    },
    text: function(){
        return T9n.get(AccountsTemplates.texts.termsPreamble, markIfMissing=false);
    },
    privacyUrl: function(){
        return AccountsTemplates.options.privacyUrl;
    },
    privacyLinkText: function(){
        return T9n.get(AccountsTemplates.texts.termsPrivacy, markIfMissing=false);
    },
    showTermsAnd: function(){
        return !!AccountsTemplates.options.privacyUrl && !!AccountsTemplates.options.termsUrl;
    },
    and: function(){
        return T9n.get(AccountsTemplates.texts.termsAnd, markIfMissing=false);
    },
    termsUrl: function(){
        return AccountsTemplates.options.termsUrl;
    },
    termsLinkText: function(){
        return T9n.get(AccountsTemplates.texts.termsTerms, markIfMissing=false);
    },
};

AT.prototype.atTermsLinkEvents = {
    "click a": function(event) {
        if (AccountsTemplates.disabled())
            event.preventDefault();
    },
};