KEYCLOAK-1934

Add display-name and display-name-html to realm
This commit is contained in:
Stian Thorgersen committed 2015-12-21 12:15:13 +01:00
1 parent 1afd3d422c
commit 606e6fa479
30 files changed
+216 -46

No files matched your search

@@ -1,6 +1,8 @@
# Common messages
enabled=Enabled
name=Name
displayName=Display name
displayNameHtml=HTML Display name
save=Save
cancel=Cancel
onText=ON
@@ -9,6 +9,20 @@
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="name">{{:: 'displayName' | translate}}</label>
<div class="col-md-6">
<input class="form-control" type="text" id="displayName" name="displayName" data-ng-model="realm.displayName">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="name">{{:: 'displayNameHtml' | translate}}</label>
<div class="col-md-6">
<input class="form-control" type="text" id="displayNameHtml" name="displayNameHtml" data-ng-model="realm.displayNameHtml">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="enabled">{{:: 'enabled' | translate}}</label>
<div class="col-md-6">
@@ -6,7 +6,7 @@
${msg("emailLinkIdpTitle", idpAlias)}
<#elseif section = "form">
<p id="instruction1" class="instruction">
${msg("emailLinkIdp1", idpAlias, brokerContext.username, realm.name)}
${msg("emailLinkIdp1", idpAlias, brokerContext.username, realm.displayName)}
</p>
<p id="instruction2" class="instruction">
${msg("emailLinkIdp2")} <a href="${url.firstBrokerLoginUrl}">${msg("doClickHere")}</a> ${msg("emailLinkIdp3")}
@@ -3,7 +3,7 @@
<#if section = "title">
${msg("oauthGrantTitle")}
<#elseif section = "header">
${msg("oauthGrantTitleHtml",(realm.name!''))} <strong><#if client.name??>${advancedMsg(client.name)}<#else>${client.clientId}</#if></strong>.
${msg("oauthGrantTitleHtml",(realm.displayNameHtml!''))} <strong><#if client.name??>${advancedMsg(client.name)}<#else>${client.clientId}</#if></strong>.
<#elseif section = "form">
<div id="kc-oauth" class="content-area">
<h3>${msg("oauthGrantRequest")}</h3>
@@ -1,9 +1,9 @@
<#import "template.ftl" as layout>
<@layout.registrationLayout; section>
<#if section = "title">
${msg("loginTitle",realm.name)}
${msg("loginTitle",realm.displayName)}
<#elseif section = "header">
${msg("loginTitleHtml",realm.name)}
${msg("loginTitleHtml",realm.displayNameHtml)}
<#elseif section = "form">
<form id="kc-totp-login-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
<div class="${properties.kcFormGroupClass!}">
@@ -1,9 +1,9 @@
<#import "template.ftl" as layout>
<@layout.registrationLayout displayInfo=social.displayInfo; section>
<#if section = "title">
${msg("loginTitle",(realm.name!''))}
${msg("loginTitle",(realm.displayName!''))}
<#elseif section = "header">
${msg("loginTitleHtml",(realm.name!''))}
${msg("loginTitleHtml",(realm.displayNameHtml!''))}
<#elseif section = "form">
<#if realm.password>
<form id="kc-form-login" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
@@ -15,9 +15,9 @@ kerberosNotConfiguredTitle=Kerberos no configurat
bypassKerberosDetail=O b\u00E9 no est\u00E0s identificat mitjan\u00E7ant Kerberos o el teu navegador no est\u00E0 configurat per identificar-se mitjan\u00E7ant Kerberos. Si us plau fes clic per identificar-te per un altre mitj\u00E0.
kerberosNotSetUp=Kerberos no est\u00E0 configurat. No pots identificar-te.
registerWithTitle=Registra''t amb {0}
registerWithTitleHtml=Registra''t amb <strong>{0}</strong>
registerWithTitleHtml={0}
loginTitle=Inicia sessi\u00F3 a {0}
loginTitleHtml=Inicia sessi\u00F3 a <strong>{0}</strong>
loginTitleHtml={0}
impersonateTitle={0}\u00A0Personifica Usuari
impersonateTitleHtml=<strong>{0}</strong> Personifica Usuari</strong>
realmChoice=Domini
@@ -26,7 +26,7 @@ loginTotpTitle=Configura la teva aplicaci\u00F3 d''identificaci\u00F3 m\u00F2bil
loginProfileTitle=Actualitza la informaci\u00F3 del teu compte
loginTimeout=Has trigat massa a identificar-te. Inicia de nou la identificaci\u00F3.
oauthGrantTitle=Concessi\u00F3 OAuth
oauthGrantTitleHtml=Acc\u00E9s temporal per <strong>{0}</strong> sol\u00B7licitat per
oauthGrantTitleHtml={0}
errorTitle=Ho sentim...
errorTitleHtml=Ho <strong>sentim</strong>...
emailVerifyTitle=Verificaci\u00F3 de l''email
@@ -19,9 +19,9 @@ recaptchaNotConfigured=Recaptcha is required, but not configured
consentDenied=Consent denied.
registerWithTitle=Registrierung bei {0}
registerWithTitleHtml=Registrierung bei <strong>{0}</strong>
registerWithTitleHtml={0}
loginTitle=Anmeldung bei {0}
loginTitleHtml=Anmeldung bei <strong>{0}</strong>
loginTitleHtml={0}
loginOauthTitle=
loginOauthTitleHtml=Tempor\u00E4rer zugriff auf <strong>{0}</strong> angefordert von <strong>{1}</strong>.
loginTotpTitle=Mobile Authentifizierung Einrichten
@@ -32,7 +32,7 @@ impersonateTitleHtml=<strong>{0}</strong> Impersonate User</strong>
unknownUser=Unknown user
realmChoice=Realm
oauthGrantTitle=OAuth gew\u00E4hren
oauthGrantTitleHtml=Tempor\u00E4rer zugriff auf <strong>{0}</strong> angefordert von
oauthGrantTitleHtml={0}
errorTitle=Es tut uns leid...
errorTitleHtml=Es tut uns leid...
emailVerifyTitle=E-Mail verifizieren
@@ -15,9 +15,9 @@ kerberosNotConfiguredTitle=Kerberos Not Configured
bypassKerberosDetail=Either you are not logged in via Kerberos or your browser is not set up for Kerberos login. Please click continue to login in through other means
kerberosNotSetUp=Kerberos is not set up. You cannot login.
registerWithTitle=Register with {0}
registerWithTitleHtml=Register with <strong>{0}</strong>
registerWithTitleHtml={0}
loginTitle=Log in to {0}
loginTitleHtml=Log in to <strong>{0}</strong>
loginTitleHtml={0}
impersonateTitle={0} Impersonate User
impersonateTitleHtml=<strong>{0}</strong> Impersonate User</strong>
realmChoice=Realm
@@ -25,8 +25,8 @@ unknownUser=Unknown user
loginTotpTitle=Mobile Authenticator Setup
loginProfileTitle=Update Account Information
loginTimeout=You took too long to login. Login process starting from beginning.
oauthGrantTitle=OAuth Grant
oauthGrantTitleHtml=Temporary access for <strong>{0}</strong> requested by
oauthGrantTitle=Grant Access
oauthGrantTitleHtml={0}
errorTitle=We''re sorry...
errorTitleHtml=We''re <strong>sorry</strong> ...
emailVerifyTitle=Email verification
@@ -15,9 +15,9 @@ kerberosNotConfiguredTitle=Kerberos no configurado
bypassKerberosDetail=O bien no est\u00E1s identificado mediante Kerberos o tu navegador no est\u00E1 configurado para identificarse mediante Kerberos. Por favor haz clic para identificarte por otro medio.
kerberosNotSetUp=Kerberos no est\u00E1 configurado. No puedes identificarte.
registerWithTitle=Reg\u00EDstrate con {0}
registerWithTitleHtml=Reg\u00EDstrate con <strong>{0}</strong>
registerWithTitleHtml={0}
loginTitle=Inicia sesi\u00F3n en {0}
loginTitleHtml=Inicia sesi\u00F3n en {0}
loginTitleHtml={0}
impersonateTitle={0}\u00A0Personificar Usuario
impersonateTitleHtml=<strong>{0}</strong> Personificar Usuario</strong>
realmChoice=Dominio
@@ -26,7 +26,7 @@ loginTotpTitle=Configura tu aplicaci\u00F3n de identificaci\u00F3n m\u00F3vil
loginProfileTitle=Actualiza la informaci\u00F3n de tu cuenta
loginTimeout=Has tardado demasiado en identificarte. Inicia de nuevo la identificaci\u00F3n.
oauthGrantTitle=Concesi\u00F3n OAuth
oauthGrantTitleHtml=Acceso temporal para <strong>{0}</strong> solicitado por
oauthGrantTitleHtml={0}
errorTitle=Lo sentimos...
errorTitleHtml=Lo <strong>sentimos</strong>...
emailVerifyTitle=Verificaci\u00F3n del email
@@ -15,9 +15,9 @@ kerberosNotConfiguredTitle=Kerberos non configur\u00e9
bypassKerberosDetail=Si vous n''\u00eates pas connect\u00e9 via Kerberos ou bien que votre navigateur n''est pas configur\u00e9 pour la connexion via Kerberos. Veuillez cliquer pour vous connecter via un autre moyen.
kerberosNotSetUp=Kerberos n''est pas configur\u00e9. Connexion impossible.
registerWithTitle=Enregistrement avec {0}
registerWithTitleHtml=Enregistrement avec <strong>{0}</strong>
registerWithTitleHtml={0}
loginTitle=Se connecter \u00e0 {0}
loginTitleHtml=Se connecter \u00e0 <strong>{0}</strong>
loginTitleHtml={0}
impersonateTitle={0} utilisateur impersonate
impersonateTitleHtml=<strong>{0}</strong> utilisateur impersonate</strong>
realmChoice=Domaine
@@ -26,7 +26,7 @@ loginTotpTitle=Configuration de l''authentification par mobile
loginProfileTitle=Mise \u00e0 jour du compte
loginTimeout=Le temps imparti pour la connexion est \u00e9coul\u00e9. Le processus de connexion red\u00e9marre depuis le d\u00e9but.
oauthGrantTitle=OAuth Grant
oauthGrantTitleHtml=Acc\u00e8s temporaire pour <strong>{0}</strong> demand\u00e9 par
oauthGrantTitleHtml={0}
errorTitle=Nous sommes d\u00e9sol\u00e9 ...
errorTitleHtml=Nous sommes <strong>d\u00e9sol\u00e9</strong> ...
emailVerifyTitle=V\u00e9rification du courriel
@@ -19,9 +19,9 @@ recaptchaNotConfigured=Recaptcha is required, but not configured
consentDenied=Consent denied.
registerWithTitle=Registrati come {0}
registerWithTitleHtml=Registrati come <strong>{0}</strong>
registerWithTitleHtml={0}
loginTitle=Accedi a {0}
loginTitleHtml=Accedi a <strong>{0}</strong>
loginTitleHtml={0}
loginTotpTitle=Configura Autenticazione Mobile
loginProfileTitle=Aggiorna Profilo
loginTimeout=You took too long to login. Login process starting from beginning.
@@ -30,7 +30,7 @@ impersonateTitleHtml=<strong>{0}</strong> Impersonate User</strong>
unknownUser=Unknown user
realmChoice=Realm
oauthGrantTitle=OAuth Grant
oauthGrantTitleHtml=Accesso temporaneo per <strong>{0}</strong> richiesto da
oauthGrantTitleHtml={0}
errorTitle=Siamo spiacenti...
errorTitleHtml=Siamo <strong>spiacenti</strong> ...
emailVerifyTitle=Verifica Email
@@ -15,9 +15,9 @@ kerberosNotConfiguredTitle=Kerberos N\u00E3o Configurado
bypassKerberosDetail=Ou voc\u00EA n\u00E3o est\u00E1 logado via Kerberos ou o seu navegador n\u00E3o est\u00E1 configurado para login Kerberos. Por favor, clique em continuar para fazer o login no atrav\u00E9s de outros meios
kerberosNotSetUp=Kerberos n\u00E3o est\u00E1 configurado. Voc\u00EA n\u00E3o pode acessar.
registerWithTitle=Registre-se com {0}
registerWithTitleHtml=Registre-se com <strong>{0}</strong>
registerWithTitleHtml={0}
loginTitle=Entrar em {0}
loginTitleHtml=Entrar em <strong>{0}</strong>
loginTitleHtml={0}
impersonateTitle={0} Impersonate User
impersonateTitleHtml=<strong>{0}</strong> Impersonate User</strong>
realmChoice=Realm
@@ -26,7 +26,7 @@ loginTotpTitle=Configura\u00E7\u00E3o do autenticador mobile
loginProfileTitle=Atualiza\u00E7\u00E3o das Informa\u00E7\u00F5es da Conta
loginTimeout=Voc\u00EA demorou muito para entrar. Por favor, refa\u00E7a o processo de login a partir do in\u00EDcio.
oauthGrantTitle=Concess\u00E3o OAuth
oauthGrantTitleHtml=Acesso tempor\u00E1rio para <strong>{0}</strong> solicitado pela
oauthGrantTitleHtml={0}
errorTitle=N\u00F3s lamentamos...
errorTitleHtml=N\u00F3s <strong>lamentamos</strong> ...
emailVerifyTitle=Verifica\u00E7\u00E3o de e-mail
@@ -1,9 +1,9 @@
<#import "template.ftl" as layout>
<@layout.registrationLayout; section>
<#if section = "title">
${msg("registerWithTitle",(realm.name!''))}
${msg("registerWithTitle",(realm.displayName!''))}
<#elseif section = "header">
${msg("registerWithTitleHtml",(realm.name!''))}
${msg("registerWithTitleHtml",(realm.displayNameHtml!''))}
<#elseif section = "form">
<form id="kc-register-form" class="${properties.kcFormClass!}" action="${url.registrationAction}" method="post">
<#if !realm.registrationEmailAsUsername>
@@ -42,6 +42,24 @@ public class RealmBean {
return realm.getName();
}
public String getDisplayName() {
String displayName = realm.getDisplayName();
if (displayName != null && displayName.length() > 0) {
return displayName;
} else {
return getName();
}
}
public String getDisplayNameHtml() {
String displayNameHtml = realm.getDisplayNameHtml();
if (displayNameHtml != null && displayNameHtml.length() > 0) {
return displayNameHtml;
} else {
return getDisplayName();
}
}
public boolean isIdentityFederationEnabled() {
return realm.isIdentityFederationEnabled();
}