use of org.olat.login.oauth.OAuthDisplayName in project OpenOLAT by OpenOLAT.
the class OAuthAuthenticationController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
for (OAuthSPI spi : oauthModule.getEnableSPIs()) {
String spiName;
int presentation;
if (spi instanceof OAuthDisplayName) {
spiName = ((OAuthDisplayName) spi).getDisplayName();
presentation = Link.BUTTON | Link.NONTRANSLATED;
} else {
spiName = "login.".concat(spi.getName());
presentation = Link.BUTTON;
}
FormLink button = uifactory.addFormLink(spiName, "login", spiName, null, formLayout, presentation);
button.setIconLeftCSS(spi.getIconCSS());
button.setElementCssClass("o_sel_auth_" + spi.getName());
button.setUserObject(spi);
}
}
use of org.olat.login.oauth.OAuthDisplayName in project openolat by klemens.
the class OAuthAuthenticationController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
for (OAuthSPI spi : oauthModule.getEnableSPIs()) {
String spiName;
int presentation;
if (spi instanceof OAuthDisplayName) {
spiName = ((OAuthDisplayName) spi).getDisplayName();
presentation = Link.BUTTON | Link.NONTRANSLATED;
} else {
spiName = "login.".concat(spi.getName());
presentation = Link.BUTTON;
}
FormLink button = uifactory.addFormLink(spiName, "login", spiName, null, formLayout, presentation);
button.setIconLeftCSS(spi.getIconCSS());
button.setElementCssClass("o_sel_auth_" + spi.getName());
button.setUserObject(spi);
}
}
Aggregations