import static org.argeo.cms.CmsMsg.username;
import java.io.IOException;
+import java.util.Collections;
import java.util.List;
import java.util.Locale;
if (this.cmsContext != null) {
defaultLocale = this.cmsContext.getDefaultLocale();
List<Locale> locales = this.cmsContext.getLocales();
- if (locales != null)
+ if (locales != null && locales.size() > 1)
localeChoice = new LocaleChoice(locales, defaultLocale);
} else {
defaultLocale = Locale.getDefault();
// credentialsBlock.setLayoutData(CmsUiUtils.fillAll());
CmsSwtUtils.style(credentialsBlock, CMS_LOGIN_DIALOG);
- Integer textWidth = 120;
+ Integer textWidth = 200;
if (parent instanceof Shell)
CmsSwtUtils.style(parent, CMS_USER_MENU);
// new Label(this, SWT.NONE).setText(CmsMsg.username.lead());
loginContext = new LoginContext(CmsAuth.LOGIN_CONTEXT_USER, subject, this);
loginContext.login();
cmsView.authChange(loginContext);
+ cmsContext.getCmsEventBus().sendEvent("cms", Collections.singletonMap("msg", "New login"));
return true;
} catch (LoginException e) {
if (log.isTraceEnabled())
// }
}
-
protected void logout() {
cmsView.logout();
cmsView.navigateTo("~");