This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

source: ps/trunk/binaries/data/mods/public/gui/prelobby/common/terms/termslobby.js

Last change on this file was 21919, checked in by elexis, 6 years ago

Allow the user to print and save the text of the terms and conditions before the conclusion of the contract and use the word "Clickwrap agreement".

See EU Court of Justice decision C-322/14, refs #5257.
Adds one string.

Differential Revision: https://code.wildfiregames.com/D1657

  • Property svn:eol-style set to native
File size: 1.7 KB
RevLine 
[21887]1var g_TermsButtonHeight = 40;
[21847]2
[21887]3function initLobbyTerms()
[21847]4{
[21919]5 let termsURL = Engine.ConfigDB_GetValue("user", "lobby.terms_url");
6
[21887]7 let terms = {
8 "Service": {
9 "title": translate("Terms of Service"),
[21895]10 "instruction": translate("Please read and accept the Terms of Service."),
[21887]11 "file": "gui/prelobby/common/terms/Terms_of_Service.txt",
[21919]12 "termsURL": termsURL + "Terms_of_Service.txt",
[21887]13 "config": "lobby.terms_of_service",
14 "salt": () => Engine.GetGUIObjectByName("username").caption,
15 "accepted": false,
16 "callback": updateFeedback
17 },
18 "Use": {
19 "title": translate("Terms of Use"),
[21895]20 "instruction": translate("Please read and accept the Terms of Use."),
[21887]21 "file": "gui/prelobby/common/terms/Terms_of_Use.txt",
[21919]22 "termsURL": termsURL + "Terms_of_Use.txt",
[21887]23 "config": "lobby.terms_of_use",
24 "salt": () => Engine.GetGUIObjectByName("username").caption,
25 "accepted": false,
26 "callback": updateFeedback
[21908]27 },
28 "Privacy": {
29 "title": translate("Privacy Policy"),
30 "instruction": translate("Please read and accept the Privacy Policy."),
31 "file": "gui/prelobby/common/terms/Privacy_Policy.txt",
[21919]32 "termsURL": termsURL + "Privacy_Policy.txt",
[21908]33 "config": "lobby.privacy_policy",
34 "salt": () => Engine.GetGUIObjectByName("username").caption,
35 "accepted": false,
36 "callback": updateFeedback
[21887]37 }
38 };
[21847]39
[21887]40 Object.keys(terms).forEach((page, i) => {
[21847]41
[21887]42 let button = Engine.GetGUIObjectByName("termsButton[" + i + "]");
[21847]43
[21887]44 button.caption = terms[page].title;
[21847]45
[21887]46 button.onPress = () => {
47 openTerms(page);
48 };
[21850]49
[21887]50 let size = button.size;
51 size.top = i * g_TermsButtonHeight;
52 size.bottom = i * g_TermsButtonHeight + 28;
53 button.size = size;
54 });
[21850]55
[21887]56 initTerms(terms);
57 loadTermsAcceptance();
[21850]58}
Note: See TracBrowser for help on using the repository browser.