KEYCLOAK-2435
Feedback on login screen not showing correctly
This commit is contained in:
parent
adfc93cfc9
commit
2974034974
6 changed files with 13 additions and 3 deletions
|
@ -109,6 +109,8 @@ public interface LoginFormsProvider extends Provider {
|
||||||
|
|
||||||
public LoginFormsProvider setSuccess(String message, Object ... parameters);
|
public LoginFormsProvider setSuccess(String message, Object ... parameters);
|
||||||
|
|
||||||
|
public LoginFormsProvider setInfo(String message, Object ... parameters);
|
||||||
|
|
||||||
public LoginFormsProvider setUser(UserModel user);
|
public LoginFormsProvider setUser(UserModel user);
|
||||||
|
|
||||||
public LoginFormsProvider setResponseHeader(String headerName, String headerValue);
|
public LoginFormsProvider setResponseHeader(String headerName, String headerValue);
|
||||||
|
|
|
@ -67,6 +67,6 @@ public class IdpUsernamePasswordForm extends UsernamePasswordForm {
|
||||||
return context.form()
|
return context.form()
|
||||||
.setFormData(formData)
|
.setFormData(formData)
|
||||||
.setAttribute(LoginFormsProvider.USERNAME_EDIT_DISABLED, true)
|
.setAttribute(LoginFormsProvider.USERNAME_EDIT_DISABLED, true)
|
||||||
.setSuccess(Messages.FEDERATED_IDENTITY_CONFIRM_REAUTHENTICATE_MESSAGE, existingUser.getUsername(), serializedCtx.getIdentityProviderId());
|
.setInfo(Messages.FEDERATED_IDENTITY_CONFIRM_REAUTHENTICATE_MESSAGE, existingUser.getUsername(), serializedCtx.getIdentityProviderId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -569,6 +569,12 @@ public class FreeMarkerLoginFormsProvider implements LoginFormsProvider {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FreeMarkerLoginFormsProvider setInfo(String message, Object... parameters) {
|
||||||
|
setMessage(MessageType.INFO, message, parameters);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FreeMarkerLoginFormsProvider setUser(UserModel user) {
|
public FreeMarkerLoginFormsProvider setUser(UserModel user) {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
|
|
|
@ -23,6 +23,6 @@ package org.keycloak.theme.beans;
|
||||||
*/
|
*/
|
||||||
public enum MessageType {
|
public enum MessageType {
|
||||||
|
|
||||||
SUCCESS, WARNING, ERROR
|
SUCCESS, WARNING, INFO, ERROR
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
<#if message.type = 'success'><span class="${properties.kcFeedbackSuccessIcon}"></span></#if>
|
<#if message.type = 'success'><span class="${properties.kcFeedbackSuccessIcon}"></span></#if>
|
||||||
<#if message.type = 'warning'><span class="${properties.kcFeedbackWarningIcon}"></span></#if>
|
<#if message.type = 'warning'><span class="${properties.kcFeedbackWarningIcon}"></span></#if>
|
||||||
<#if message.type = 'error'><span class="${properties.kcFeedbackErrorIcon}"></span></#if>
|
<#if message.type = 'error'><span class="${properties.kcFeedbackErrorIcon}"></span></#if>
|
||||||
|
<#if message.type = 'info'><span class="${properties.kcFeedbackInfoIcon}"></span></#if>
|
||||||
<span class="kc-feedback-text">${message.summary}</span>
|
<span class="kc-feedback-text">${message.summary}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -20,7 +20,8 @@ kcFormAreaClass=col-xs-12 col-sm-8 col-md-8 col-lg-7 login
|
||||||
|
|
||||||
kcFeedbackErrorIcon=pficon pficon-error-circle-o
|
kcFeedbackErrorIcon=pficon pficon-error-circle-o
|
||||||
kcFeedbackWarningIcon=pficon pficon-warning-triangle-o
|
kcFeedbackWarningIcon=pficon pficon-warning-triangle-o
|
||||||
kcFeedbackSuccessIcon=alert alert-success
|
kcFeedbackSuccessIcon=pficon pficon-ok
|
||||||
|
kcFeedbackInfoIcon=pficon pficon-info
|
||||||
|
|
||||||
|
|
||||||
kcFormClass=form-horizontal
|
kcFormClass=form-horizontal
|
||||||
|
|
Loading…
Reference in a new issue