Index: ps/trunk/binaries/data/config/default.cfg =================================================================== --- ps/trunk/binaries/data/config/default.cfg +++ ps/trunk/binaries/data/config/default.cfg @@ -415,6 +415,7 @@ server = "lobby.wildfiregames.com" ; Address of lobby server require_tls = true ; Whether to reject connecting to the lobby if TLS encryption is unavailable. verify_certificate = false ; Whether to reject connecting to the lobby if the TLS certificate is invalid (TODO: wait for Gloox GnuTLS trust implementation to be fixed) +terms_url = "https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/gui/prelobby/common/terms/"; Allows the user to save the text and print the terms terms_of_service = "0" ; Version (hash) of the Terms of Service that the user has accepted terms_of_use = "0" ; Version (hash) of the Terms of Use that the user has accepted privacy_policy = "0" ; Version (hash) of the Privacy Policy that the user has accepted @@ -478,7 +479,8 @@ [userreport] ; Opt-in online user reporting system url_upload = "https://feedback.wildfiregames.com/report/upload/v1/" ; URL where UserReports are uploaded to -url_publication = "http://feedback.wildfiregames.com/" ; URL where UserReports were analyzed and published +url_publication = "https://feedback.wildfiregames.com/" ; URL where UserReports were analyzed and published +url_terms = "https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/gui/userreport/Terms_and_Conditions.txt"; Allows the user to save the text and print the terms terms = "0" ; Version (hash) of the UserReporter Terms that the user has accepted [view] ; Camera control settings Index: ps/trunk/binaries/data/mods/mod/gui/common/terms.js =================================================================== --- ps/trunk/binaries/data/mods/mod/gui/common/terms.js +++ ps/trunk/binaries/data/mods/mod/gui/common/terms.js @@ -12,6 +12,7 @@ "title": g_Terms[page].title, "sprintf": g_Terms[page].sprintf, "urlButtons": g_Terms[page].urlButtons || [], + "termsURL": g_Terms[page].termsURL || undefined, "page": page, "callback": "acceptTerms" }); Index: ps/trunk/binaries/data/mods/mod/gui/termsdialog/termsdialog.js =================================================================== --- ps/trunk/binaries/data/mods/mod/gui/termsdialog/termsdialog.js +++ ps/trunk/binaries/data/mods/mod/gui/termsdialog/termsdialog.js @@ -1,3 +1,12 @@ +/** + * This implements a basic "Clickwrap agreement", which is an industry standard: + * + * The European Court of Justice decided in the case El Majdoub (case nr C-322/14) that click-wrap agreements are acceptable under certain circumstances + * as proof of the acceptance of terms and conditions (in the meaning of Regulation 44/2001, now replaced by Regulation 1215/2012). + * See https://eur-lex.europa.eu/legal-content/en/TXT/HTML/?uri=uriserv%3AOJ.C_.2015.236.01.0019.01.ENG + * The user should be able to save and print the text of the terms. + */ + var g_TermsPage; var g_TermsFile; var g_TermsSprintf; @@ -9,14 +18,20 @@ g_TermsSprintf = data.sprintf; Engine.GetGUIObjectByName("title").caption = data.title; - initURLButtons(data.urlButtons); + initURLButtons(data.termsURL, data.urlButtons); initLanguageSelection(); } -function initURLButtons(urlButtons) +function initURLButtons(termsURL, urlButtons) { - urlButtons.forEach((urlButton, i) => { + if (termsURL) + urlButtons.unshift({ + // Translation: Label of a button that when pressed opens the Terms and Conditions in the default webbrowser. + "caption": translate("View online"), + "url": termsURL + }); + urlButtons.forEach((urlButton, i) => { let button = Engine.GetGUIObjectByName("button[" + i + "]"); button.caption = urlButton.caption; button.hidden = false; Index: ps/trunk/binaries/data/mods/public/gui/pregame/userreport/userreport.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/pregame/userreport/userreport.js +++ ps/trunk/binaries/data/mods/public/gui/pregame/userreport/userreport.js @@ -3,6 +3,7 @@ "title": translateWithContext("UserReporter Terms and Conditions", "Terms"), "instruction": translate("Please read and accept the UserReporter Terms and Conditions."), "file": "gui/userreport/Terms_and_Conditions.txt", + "termsURL": Engine.ConfigDB_GetValue("user", "userreport.url_terms"), "sprintf": { "logPath": setStringTags(Engine.GetUserReportLogPath(), { "font": "sans-bold-12" }), "configPath": setStringTags(Engine.GetUserReportConfigPath(), { "font": "sans-bold-12" }) Index: ps/trunk/binaries/data/mods/public/gui/prelobby/common/terms/termslobby.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/prelobby/common/terms/termslobby.js +++ ps/trunk/binaries/data/mods/public/gui/prelobby/common/terms/termslobby.js @@ -2,11 +2,14 @@ function initLobbyTerms() { + let termsURL = Engine.ConfigDB_GetValue("user", "lobby.terms_url"); + let terms = { "Service": { "title": translate("Terms of Service"), "instruction": translate("Please read and accept the Terms of Service."), "file": "gui/prelobby/common/terms/Terms_of_Service.txt", + "termsURL": termsURL + "Terms_of_Service.txt", "config": "lobby.terms_of_service", "salt": () => Engine.GetGUIObjectByName("username").caption, "accepted": false, @@ -16,6 +19,7 @@ "title": translate("Terms of Use"), "instruction": translate("Please read and accept the Terms of Use."), "file": "gui/prelobby/common/terms/Terms_of_Use.txt", + "termsURL": termsURL + "Terms_of_Use.txt", "config": "lobby.terms_of_use", "salt": () => Engine.GetGUIObjectByName("username").caption, "accepted": false, @@ -25,6 +29,7 @@ "title": translate("Privacy Policy"), "instruction": translate("Please read and accept the Privacy Policy."), "file": "gui/prelobby/common/terms/Privacy_Policy.txt", + "termsURL": termsURL + "Privacy_Policy.txt", "config": "lobby.privacy_policy", "salt": () => Engine.GetGUIObjectByName("username").caption, "accepted": false,