import org.argeo.api.cms.ux.CmsView;
import org.argeo.app.ui.SuiteEvent;
import org.argeo.app.ui.SuiteIcon;
-import org.argeo.app.ui.dialogs.NewUserWizard;
import org.argeo.cms.CmsUserManager;
import org.argeo.cms.acr.ContentUtils;
import org.argeo.cms.auth.CmsRole;
import org.argeo.cms.auth.CurrentUser;
import org.argeo.cms.auth.UserAdminUtils;
import org.argeo.cms.jcr.acr.JcrContent;
-import org.argeo.cms.jface.dialog.CmsWizardDialog;
import org.argeo.cms.swt.CmsSwtTheme;
import org.argeo.cms.swt.CmsSwtUtils;
import org.argeo.cms.swt.Selected;
import org.argeo.util.naming.LdapAttrs;
import org.argeo.util.naming.LdapObjs;
import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.GridData;
@Override
public String getText(HierarchyUnit model) {
- return model.getHierarchyUnitName();
+ return model.getHierarchyUnitLabel(CurrentUser.locale());
}
@Override
if (content.hasContentClass(LdapObjs.organization.qName()))
return SuiteIcon.organisation;
else if (content.hasContentClass(LdapObjs.posixGroup.qName()))
- return SuiteIcon.group;
+ return SuiteIcon.users;
else
- return SuiteIcon.people;
+ return SuiteIcon.addressBook;
}
};
else if (role.isContentClass(LdapObjs.inetOrgPerson.qName()))
return SuiteIcon.person;
else if (role.isContentClass(LdapObjs.organization.qName()))
- return SuiteIcon.organisation;
+ return SuiteIcon.organisationContact;
else if (role.isContentClass(LdapObjs.groupOfNames.qName()))
return SuiteIcon.group;
else
});
addItem.addSelectionListener((Selected) (e) -> {
- // SuiteUtils.getOrCreateUserNode(adminSession, userDn);
- GuidedForm wizard = new NewUserWizard(null);
+ HierarchyUnit hierarchyUnit = usersPart.getInput();
+ Content huContent = ContentUtils.hierarchyUnitToContent(contentSession, hierarchyUnit);
+ GuidedForm wizard = new NewUserForm(cmsUserManager, huContent);
SwtGuidedFormDialog dialog = new SwtGuidedFormDialog(parent.getShell(), wizard);
// WizardDialog dialog = new WizardDialog(shell, wizard);
if (dialog.open() == Window.OK) {