From 4383efa32c5e5dae48abc6fec9526835b3a1c7d9 Mon Sep 17 00:00:00 2001 From: Pierre Date: Thu, 10 May 2018 15:06:29 +0200 Subject: [PATCH] Users must accept terms of use of the network --- assets/js/pages/createAccount.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/assets/js/pages/createAccount.js b/assets/js/pages/createAccount.js index dc6702e1..fed409e5 100644 --- a/assets/js/pages/createAccount.js +++ b/assets/js/pages/createAccount.js @@ -93,6 +93,13 @@ ComunicWeb.pages.createAccount = { type: "password" }); + //Terms of use must have been accepted + var siteTerms = createFormGroup({ + target: formRoot, + label: "I have read and accepted the terms of use of the network", + type: "checkbox" + }); + //Submit form var submitButtonContainer = createElem2({ appendTo: formRoot, @@ -130,6 +137,10 @@ ComunicWeb.pages.createAccount = { //Empty the message target emptyElem(messagesTarget); + //Check the terms of use have been accepted + if(!siteTerms.checked) + return notify("Please read and accept the terms of use of the website!", "danger"); + //Check the first name if(!ComunicWeb.common.formChecker.checkInput(firstNameInput, true)) return notify("Please check your first name !", "danger");