fix login.ftl page
This commit is contained in:
parent
e307916233
commit
d783c6200e
2 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<#import "template.ftl" as layout>
|
||||
<@layout.registrationLayout displayInfo=social.displaySocialProviders; section>
|
||||
<@layout.registrationLayout displayInfo=social.displayInfo; section>
|
||||
<#if section = "title">
|
||||
${rb.loginTitle} ${realm.name}
|
||||
<#elseif section = "header">
|
||||
|
@ -57,6 +57,7 @@
|
|||
</div>
|
||||
</#if>
|
||||
|
||||
<#if social.providers??>
|
||||
<div id="kc-social-providers">
|
||||
<ul>
|
||||
<#list social.providers as p>
|
||||
|
@ -64,5 +65,6 @@
|
|||
</#list>
|
||||
</ul>
|
||||
</div>
|
||||
</#if>
|
||||
</#if>
|
||||
</@layout.registrationLayout>
|
||||
|
|
|
@ -39,8 +39,10 @@ public class SocialBean {
|
|||
private boolean displaySocial;
|
||||
|
||||
private List<SocialProvider> providers;
|
||||
private RealmModel realm;
|
||||
|
||||
public SocialBean(RealmModel realm, URI baseURI) {
|
||||
this.realm = realm;
|
||||
Map<String, String> socialConfig = realm.getSocialConfig();
|
||||
if (realm.isSocial() && !socialConfig.isEmpty()) {
|
||||
displaySocial = true;
|
||||
|
@ -60,6 +62,10 @@ public class SocialBean {
|
|||
return providers;
|
||||
}
|
||||
|
||||
public boolean isDisplayInfo() {
|
||||
return realm.isRegistrationAllowed() || displaySocial;
|
||||
}
|
||||
|
||||
public boolean isDisplaySocialProviders() {
|
||||
return displaySocial;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue