From b21aa1ab33a60f223cb7e71f50ec6c4f87178bb4 Mon Sep 17 00:00:00 2001 From: Vincenzo Cestone Date: Fri, 16 Apr 2021 18:30:49 +0200 Subject: [PATCH] Revised the username validation pattern in register account --- src/themes/d4science/login/login-update-profile.ftl | 7 ++++++- src/themes/d4science/login/messages/messages_en.properties | 4 +++- src/themes/d4science/login/messages/messages_it.properties | 4 +++- src/themes/d4science/login/register.ftl | 7 ++++++- src/themes/d4science/login/terms.ftl | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/themes/d4science/login/login-update-profile.ftl b/src/themes/d4science/login/login-update-profile.ftl index 91e4380..06cc3d8 100644 --- a/src/themes/d4science/login/login-update-profile.ftl +++ b/src/themes/d4science/login/login-update-profile.ftl @@ -10,8 +10,13 @@
- +
+
diff --git a/src/themes/d4science/login/messages/messages_en.properties b/src/themes/d4science/login/messages/messages_en.properties index f6f4d6d..995fc9d 100644 --- a/src/themes/d4science/login/messages/messages_en.properties +++ b/src/themes/d4science/login/messages/messages_en.properties @@ -1,3 +1,5 @@ confirmLinkIdpReviewProfile=Review information for new profile -termsAcceptMsg=You have to scroll down to read and then accept the terms \ No newline at end of file +termsAcceptMsg=You have to scroll down to read and then accept the terms + +usernameValidityMsg=Only letters, numbers and dots are permitted \ No newline at end of file diff --git a/src/themes/d4science/login/messages/messages_it.properties b/src/themes/d4science/login/messages/messages_it.properties index 354af0e..5358c85 100644 --- a/src/themes/d4science/login/messages/messages_it.properties +++ b/src/themes/d4science/login/messages/messages_it.properties @@ -1 +1,3 @@ -confirmLinkIdpReviewProfile=Rivedi le informazioni del nuovo profilo \ No newline at end of file +confirmLinkIdpReviewProfile=Rivedi le informazioni del nuovo profilo + +usernameValidityMsg=Sono consentiti solo lettere, numeri e punti \ No newline at end of file diff --git a/src/themes/d4science/login/register.ftl b/src/themes/d4science/login/register.ftl index 51eb46d..94ea318 100644 --- a/src/themes/d4science/login/register.ftl +++ b/src/themes/d4science/login/register.ftl @@ -37,8 +37,13 @@
- +
+ diff --git a/src/themes/d4science/login/terms.ftl b/src/themes/d4science/login/terms.ftl index 1c384a6..c6c5ccd 100644 --- a/src/themes/d4science/login/terms.ftl +++ b/src/themes/d4science/login/terms.ftl @@ -17,7 +17,7 @@ function checkKcTermsScrollHeight(){ var kcTermsTextElement = document.getElementById("kc-terms-text") - if ((kcTermsTextElement.scrollTop + kcTermsTextElement.offsetHeight) >= kcTermsTextElement.scrollHeight){ + if ((kcTermsTextElement.scrollTop + kcTermsTextElement.offsetHeight + 5) >= kcTermsTextElement.scrollHeight){ document.getElementById("kc-accept").disabled = false; } }