private JCheckBox canCreateCheckbox;\r
\r
private JCheckBox notFederatedCheckbox;\r
+ \r
+ private JTextField organizationalUnitField;\r
+ \r
+ private JTextField organizationField;\r
\r
+ private JTextField localityField;\r
+ \r
+ private JTextField stateProvinceField;\r
+ \r
+ private JTextField countryCodeField;\r
+ \r
private RegistrantPermissionsPanel repositoryPalette;\r
\r
private JPalette<TeamModel> teamsPalette;\r
Translation.get("gb.excludeFromFederationDescription"),\r
anUser.excludeFromFederation);\r
\r
+ organizationalUnitField = new JTextField(anUser.organizationalUnit == null ? "" : anUser.organizationalUnit, 25);\r
+ organizationField = new JTextField(anUser.organization == null ? "" : anUser.organization, 25);\r
+ localityField = new JTextField(anUser.locality == null ? "" : anUser.locality, 25);\r
+ stateProvinceField = new JTextField(anUser.stateProvince == null ? "" : anUser.stateProvince, 25);\r
+ countryCodeField = new JTextField(anUser.countryCode == null ? "" : anUser.countryCode, 15);\r
+ \r
// credentials are optionally controlled by 3rd-party authentication\r
usernameField.setEnabled(settings.supportsCredentialChanges);\r
passwordField.setEnabled(settings.supportsCredentialChanges);\r
\r
displayNameField.setEnabled(settings.supportsDisplayNameChanges);\r
emailAddressField.setEnabled(settings.supportsEmailAddressChanges);\r
+ \r
+ organizationalUnitField.setEnabled(settings.supportsDisplayNameChanges);\r
+ organizationField.setEnabled(settings.supportsDisplayNameChanges);\r
+ localityField.setEnabled(settings.supportsDisplayNameChanges);\r
+ stateProvinceField.setEnabled(settings.supportsDisplayNameChanges);\r
+ countryCodeField.setEnabled(settings.supportsDisplayNameChanges);\r
\r
JPanel fieldsPanel = new JPanel(new GridLayout(0, 1));\r
fieldsPanel.add(newFieldPanel(Translation.get("gb.username"), usernameField));\r
fieldsPanel.add(newFieldPanel(Translation.get("gb.excludeFromFederation"),\r
notFederatedCheckbox));\r
\r
+ JPanel attributesPanel = new JPanel(new GridLayout(0, 1, 5, 2));\r
+ attributesPanel.add(newFieldPanel(Translation.get("gb.organizationalUnit") + " (OU)", organizationalUnitField));\r
+ attributesPanel.add(newFieldPanel(Translation.get("gb.organization") + " (O)", organizationField));\r
+ attributesPanel.add(newFieldPanel(Translation.get("gb.locality") + " (L)", localityField));\r
+ attributesPanel.add(newFieldPanel(Translation.get("gb.stateProvince") + " (ST)", stateProvinceField));\r
+ attributesPanel.add(newFieldPanel(Translation.get("gb.countryCode") + " (C)", countryCodeField));\r
+ \r
final Insets _insets = new Insets(5, 5, 5, 5);\r
repositoryPalette = new RegistrantPermissionsPanel(RegistrantType.REPOSITORY);\r
teamsPalette = new JPalette<TeamModel>();\r
JPanel fieldsPanelTop = new JPanel(new BorderLayout());\r
fieldsPanelTop.add(fieldsPanel, BorderLayout.NORTH);\r
\r
+ JPanel attributesPanelTop = new JPanel(new BorderLayout());\r
+ attributesPanelTop.add(attributesPanel, BorderLayout.NORTH);\r
+\r
JPanel repositoriesPanel = new JPanel(new BorderLayout()) {\r
\r
private static final long serialVersionUID = 1L;\r
\r
JTabbedPane panel = new JTabbedPane(JTabbedPane.TOP);\r
panel.addTab(Translation.get("gb.general"), fieldsPanelTop);\r
+ panel.addTab(Translation.get("gb.attributes"), attributesPanelTop);\r
if (protocolVersion > 1) {\r
panel.addTab(Translation.get("gb.teamMemberships"), teamsPanel);\r
}\r
user.canCreate = canCreateCheckbox.isSelected();\r
user.excludeFromFederation = notFederatedCheckbox.isSelected();\r
\r
+ user.organizationalUnit = organizationalUnitField.getText().trim();\r
+ user.organization = organizationField.getText().trim();\r
+ user.locality = localityField.getText().trim();\r
+ user.stateProvince = stateProvinceField.getText().trim();\r
+ user.countryCode = countryCodeField.getText().trim();\r
+ \r
for (RegistrantAccessPermission rp : repositoryPalette.getPermissions()) {\r
user.setRepositoryPermission(rp.registrant, rp.permission);\r
}\r
<!-- tab titles -->\r
<ul class="nav nav-tabs">\r
<li class="active"><a href="#general" data-toggle="tab"><wicket:message key="gb.general"></wicket:message></a></li>\r
+ <li><a href="#attributes" data-toggle="tab"><wicket:message key="gb.attributes"></wicket:message></a></li>\r
<li><a href="#permissions" data-toggle="tab"><wicket:message key="gb.accessPermissions"></wicket:message></a></li>\r
</ul>\r
\r
</table>\r
</div>\r
\r
+ <!-- attributes tab -->\r
+ <div class="tab-pane" id="attributes">\r
+ <table class="plain">\r
+ <tbody class="settings">\r
+ <tr><th><wicket:message key="gb.organizationalUnit"></wicket:message> (OU)</th><td class="edit"><input type="text" wicket:id="organizationalUnit" size="30" tabindex="1" /></td></tr>\r
+ <tr><th><wicket:message key="gb.organization"></wicket:message> (O)</th><td class="edit"><input type="text" wicket:id="organization" size="30" tabindex="2" /></td></tr>\r
+ <tr><th><wicket:message key="gb.locality"></wicket:message> (L)</th><td class="edit"><input type="text" wicket:id="locality" size="30" tabindex="3" /></td></tr>\r
+ <tr><th><wicket:message key="gb.stateProvince"></wicket:message> (ST)</th><td class="edit"><input type="text" wicket:id="stateProvince" size="30" tabindex="4" /></td></tr>\r
+ <tr><th><wicket:message key="gb.countryCode"></wicket:message> (C)</th><td class="edit"><input type="text" wicket:id="countryCode" size="15 " tabindex="5" /></td></tr>\r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ \r
<!-- access permissions tab -->\r
<div class="tab-pane" id="permissions">\r
<table class="plain">\r