Compare commits

...

5 Commits

9 changed files with 51 additions and 9 deletions

View File

@ -1,5 +1,9 @@
# D4Science Keycloak Themes
# [DEPRECATED]
## This repo is now obsolete/unmantained and its base code and all D4Science's GW themes are now available into the [keycloak-d4science-spi-parent/keycloak-d4science-theme](https://code-repo.d4science.org/gCubeSystem/keycloak-d4science-spi-parent/src/branch/master/keycloak-d4science-theme) repo. In this new repo, themes can now be built as JAR, by using the included `maven` script, for an easier deployment.
##
**D4Science Keycloak Themes** repository collects the implementations of base D4Science theme and a set of specific per gateway themes implementations.
Each Keycloak theme is made of a set of [Freemarker](https://freemarker.apache.org/) templates.

View File

@ -10,7 +10,7 @@
<label for="username" class="${properties.kcLabelClass!}">${msg("username")}</label>
</div>
<div class="${properties.kcInputWrapperClass!}">
<input type="text" id="username" name="username" value="${(user.username!'')}" class="${properties.kcInputClass!}" pattern="^(?!postfix$)(?!cyrus$)[^\s/\-\\]+$" />
<input type="text" id="username" name="username" value="${(user.username!'')}" class="${properties.kcInputClass!}" pattern="^(?!postfix$)(?!cyrus$)[a-zA-Z0-9\.]+$" title='${msg("usernameValidityMsg")}' />
</div>
</div>
</#if>

View File

@ -1 +1,3 @@
confirmLinkIdpReviewProfile=Informationen für neues Profil überprüfen
confirmLinkIdpReviewProfile=Informationen für neues Profil überprüfen
updatePasswordMessage=Sie m\u00FCssen Ihr Passwort einzurichten, um das Benutzerkonto zu aktivieren.

View File

@ -1,3 +1,7 @@
confirmLinkIdpReviewProfile=Review information for new profile
termsAcceptMsg=You have to scroll down to read and then accept the terms
termsAcceptMsg=You have to scroll down to read and then accept the terms
usernameValidityMsg=Only letters, numbers and dots are permitted
updatePasswordMessage=You need to set up your password to activate your account.

View File

@ -1 +1,3 @@
confirmLinkIdpReviewProfile=Revisar información para nuevo perfil
confirmLinkIdpReviewProfile=Revisar información para nuevo perfil
updatePasswordMessage=Tienes que configurar tu contrase\u00F1a para activar tu cuenta.

View File

@ -1 +1,3 @@
confirmLinkIdpReviewProfile=Examiner les informations pour le nouveau profil
confirmLinkIdpReviewProfile=Examiner les informations pour le nouveau profil
updatePasswordMessage=Vous devez configurer votre mot de passe pour activer votre compte.

View File

@ -1 +1,5 @@
confirmLinkIdpReviewProfile=Rivedi le informazioni del nuovo profilo
confirmLinkIdpReviewProfile=Rivedi le informazioni del nuovo profilo
usernameValidityMsg=Sono consentiti solo lettere, numeri e punti
updatePasswordMessage=Devi impostare la password per attivare il tuo account.

View File

@ -37,7 +37,7 @@
<label for="username" class="${properties.kcLabelClass!}">${msg("username")}</label>
</div>
<div class="${properties.kcInputWrapperClass!}">
<input type="text" id="username" class="${properties.kcInputClass!}" name="username" value="${(register.formData.username!'')}" pattern="^(?!postfix$)(?!cyrus$)[\w\.]+$" autocomplete="username" />
<input type="text" id="username" class="${properties.kcInputClass!}" name="username" value="${(register.formData.username!'')}" pattern="^(?!postfix$)(?!cyrus$)[a-zA-Z0-9\.]+$" title='${msg("usernameValidityMsg")}' autocomplete="username" />
</div>
</div>
</#if>
@ -78,9 +78,33 @@
</div>
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doRegister")}"/>
<input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" name="submitBtn" type="submit" value="${msg("doRegister")}"/>
</div>
</div>
</form>
<script type="text/javascript">
var screenname = document.getElementById("username")
if (screenname) {
screenname.addEventListener("input", function(ev) {
if (screenname.validity.patternMismatch) {
screenname.setCustomValidity('${msg("usernameValidityMsg")}')
screenname.reportValidity()
} else {
screenname.setCustomValidity('')
screenname.reportValidity()
}
})
}
var kcRegisterForm = document.getElementById("kc-register-form")
kcRegisterForm.submitBtn.addEventListener("click", function(ev) {
if (!kcRegisterForm.checkValidity()) {
ev.preventDefault()
ev.stopPropagation()
kcRegisterForm.reportValidity()
}
})
</script>
</#if>
</@layout.registrationLayout>

View File

@ -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;
}
}