use of pl.edu.icm.unity.webui.common.i18n.I18nTextField in project unity by unity-idm.
the class OTPAuthenticatorEditor method buildInteractiveLoginSettingsSection.
private CollapsibleLayout buildInteractiveLoginSettingsSection() {
FormLayoutWithFixedCaptionWidth interactiveLoginSettings = new FormLayoutWithFixedCaptionWidth();
interactiveLoginSettings.setMargin(false);
I18nTextField retrievalName = new I18nTextField(msg);
retrievalName.setCaption(msg.getMessage("OTPAuthenticatorEditor.formName"));
configBinder.forField(retrievalName).bind("retrievalName");
interactiveLoginSettings.addComponents(retrievalName);
CollapsibleLayout wrapper = new CollapsibleLayout(msg.getMessage("BaseAuthenticatorEditor.interactiveLoginSettings"), interactiveLoginSettings);
return wrapper;
}
use of pl.edu.icm.unity.webui.common.i18n.I18nTextField in project unity by unity-idm.
the class PamAuthenticatorEditor method buildInteractiveLoginSettingsSection.
private CollapsibleLayout buildInteractiveLoginSettingsSection() {
FormLayoutWithFixedCaptionWidth interactiveLoginSettings = new FormLayoutWithFixedCaptionWidth();
interactiveLoginSettings.setMargin(false);
I18nTextField retrievalName = new I18nTextField(msg);
retrievalName.setCaption(msg.getMessage("PamAuthenticatorEditor.displayedName"));
configBinder.forField(retrievalName).bind("retrievalName");
interactiveLoginSettings.addComponent(retrievalName);
CheckBox accountAssociation = new CheckBox(msg.getMessage("PamAuthenticatorEditor.accountAssociation"));
configBinder.forField(accountAssociation).bind("accountAssociation");
interactiveLoginSettings.addComponent(accountAssociation);
ComboBox<String> registrationForm = new ComboBox<>(msg.getMessage("PamAuthenticatorEditor.registrationForm"));
registrationForm.setItems(registrationForms);
configBinder.forField(registrationForm).bind("registrationForm");
interactiveLoginSettings.addComponent(registrationForm);
return new CollapsibleLayout(msg.getMessage("BaseAuthenticatorEditor.interactiveLoginSettings"), interactiveLoginSettings);
}
use of pl.edu.icm.unity.webui.common.i18n.I18nTextField in project unity by unity-idm.
the class PasswordAuthenticatorEditor method buildInteractiveLoginSettingsSection.
private CollapsibleLayout buildInteractiveLoginSettingsSection() {
FormLayoutWithFixedCaptionWidth interactiveLoginSettings = new FormLayoutWithFixedCaptionWidth();
interactiveLoginSettings.setMargin(false);
I18nTextField retrievalName = new I18nTextField(msg);
retrievalName.setCaption(msg.getMessage("PasswordAuthenticatorEditor.passwordName"));
configBinder.forField(retrievalName).bind("retrievalName");
interactiveLoginSettings.addComponent(retrievalName);
CollapsibleLayout wrapper = new CollapsibleLayout(msg.getMessage("BaseAuthenticatorEditor.interactiveLoginSettings"), interactiveLoginSettings);
return wrapper;
}
use of pl.edu.icm.unity.webui.common.i18n.I18nTextField in project unity by unity-idm.
the class SMSAuthenticatorEditor method buildInteractiveLoginSettingsSection.
private CollapsibleLayout buildInteractiveLoginSettingsSection() {
FormLayoutWithFixedCaptionWidth interactiveLoginSettings = new FormLayoutWithFixedCaptionWidth();
interactiveLoginSettings.setMargin(false);
I18nTextField retrievalName = new I18nTextField(msg);
retrievalName.setCaption(msg.getMessage("SMSAuthenticatorEditor.formName"));
configBinder.forField(retrievalName).bind("retrievalName");
interactiveLoginSettings.addComponents(retrievalName);
CollapsibleLayout wrapper = new CollapsibleLayout(msg.getMessage("BaseAuthenticatorEditor.interactiveLoginSettings"), interactiveLoginSettings);
return wrapper;
}
use of pl.edu.icm.unity.webui.common.i18n.I18nTextField in project unity by unity-idm.
the class GroupEditDialog method getContents.
@Override
protected Component getContents() {
FormLayout fl = new CompactFormLayout();
fl.setMargin(true);
fl.setSpacing(true);
path = new TextField(msg.getMessage("GroupEditDialog.groupPath"));
path.setValue(originalGroup.getPathEncoded());
path.setReadOnly(true);
path.setWidthFull();
fl.addComponent(path);
displayedName = new I18nTextField(msg, msg.getMessage("displayedNameF"));
displayedName.setValue(originalGroup.getDisplayedName());
description = new I18nTextArea(msg, msg.getMessage("GroupEditDialog.groupDesc"));
description.setValue(originalGroup.getDescription());
isPublic = new CheckBox(msg.getMessage("GroupEditDialog.public"));
isPublic.setValue(originalGroup.isPublic());
propertiesEditor = new GridWithEditor<>(msg, GroupPropertyBean.class, t -> false, false, false);
propertiesEditor.setCaption(msg.getMessage("GroupEditDialog.groupProperties"));
propertiesEditor.getEditor().addOpenListener(e -> edited = e.getBean());
propertiesEditor.addTextColumn(s -> s.key, (t, v) -> t.setKey(v), msg.getMessage("GroupEditDialog.propertyName"), 10, true, Optional.of((value, context) -> {
if (propertiesEditor.getValue().stream().filter(k -> !k.key.equals(edited.key)).map(k -> k.key).anyMatch(k -> k.equals(value))) {
return ValidationResult.error(msg.getMessage("GroupEditDialog.propertyNameExists"));
}
return new StringLengthValidator(msg.getMessage("maxLength", GroupProperty.MAX_KEY_LENGTH), 0, GroupProperty.MAX_KEY_LENGTH).apply(value, context);
}));
propertiesEditor.addTextColumn(s -> s.getValue(), (t, v) -> t.setValue(v), msg.getMessage("GroupEditDialog.propertyValue"), 40, false, Optional.of(new StringLengthValidator(msg.getMessage("maxLength", GroupProperty.MAX_VALUE_LENGHT), 0, GroupProperty.MAX_VALUE_LENGHT)));
propertiesEditor.setValue(originalGroup.getProperties().values().stream().map(p -> new GroupPropertyBean(p)).collect(Collectors.toList()));
fl.addComponents(displayedName, description, isPublic, propertiesEditor);
description.focus();
return fl;
}
Aggregations