Modify wording on login widget to include sitename
This commit is contained in:
parent
23b0487c4a
commit
bc2a2dbc1a
2 changed files with 9 additions and 4 deletions
|
@ -51,7 +51,8 @@ public class LoginWidget extends Widget {
|
|||
ERROR_MESSAGE("errorMessage"),
|
||||
EXTERNAL_AUTH_NAME("externalAuthName"),
|
||||
EXTERNAL_AUTH_URL("externalAuthUrl"),
|
||||
CANCEL_URL("cancelUrl");
|
||||
CANCEL_URL("cancelUrl"),
|
||||
SITE_NAME("siteName");
|
||||
|
||||
private final String variableName;
|
||||
|
||||
|
@ -77,6 +78,8 @@ public class LoginWidget extends Widget {
|
|||
State state = getCurrentLoginState(request);
|
||||
log.debug("State on exit: " + state);
|
||||
|
||||
String siteName = env.getDataModel().get("siteName").toString();
|
||||
|
||||
switch (state) {
|
||||
case LOGGED_IN:
|
||||
// On the login page itself, show a message that the user is already logged in.
|
||||
|
@ -92,7 +95,7 @@ public class LoginWidget extends Widget {
|
|||
values = showPasswordChangeScreen(request);
|
||||
break;
|
||||
default:
|
||||
values = showLoginScreen(request);
|
||||
values = showLoginScreen(request, siteName);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e);
|
||||
|
@ -108,7 +111,7 @@ public class LoginWidget extends Widget {
|
|||
/**
|
||||
* User is starting the login process. Show them the login screen.
|
||||
*/
|
||||
private WidgetTemplateValues showLoginScreen(HttpServletRequest request)
|
||||
private WidgetTemplateValues showLoginScreen(HttpServletRequest request, String siteName)
|
||||
throws IOException {
|
||||
LoginProcessBean bean = LoginProcessBean.getBean(request);
|
||||
log.trace("Going to login screen: " + bean);
|
||||
|
@ -134,6 +137,8 @@ public class LoginWidget extends Widget {
|
|||
values.put(TemplateVariable.ERROR_MESSAGE.toString(), errorMessage);
|
||||
}
|
||||
|
||||
values.put(TemplateVariable.SITE_NAME.toString(), siteName);
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<p class="external-auth"><a class="blue button" href="${externalAuthUrl}">${externalAuthName}</a></p>
|
||||
<p class="or-auth">or</p>
|
||||
|
||||
<h3 class="internal-auth" >Login using a different account</h3>
|
||||
<h3 class="internal-auth" >Log in using your ${siteName} account</h3>
|
||||
</#if>
|
||||
|
||||
<label for="email">Email</label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue