Commit 3f604eff authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Reuse of existing LDAP setup wizard in admin console. JM-877

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5817 b35dd754-fafc-0310-a699-88a17e54d16e
parent 612c363d
...@@ -154,6 +154,9 @@ ...@@ -154,6 +154,9 @@
## Added key: 'setup.ldap.group.test.label-elements' ## Added key: 'setup.ldap.group.test.label-elements'
## Added key: 'setup.ldap.group.test.group-not-found' ## Added key: 'setup.ldap.group.test.group-not-found'
## Added key: 'group.read_only' ## Added key: 'group.read_only'
## Added key: 'sidebar.profile-settings'
## Added key: 'sidebar.profile-settings.descr'
## Added section: 'profile-settings.*'
# Wildfire # Wildfire
...@@ -182,6 +185,8 @@ tab.server.descr=Click to manage server settings ...@@ -182,6 +185,8 @@ tab.server.descr=Click to manage server settings
sidebar.server-email=Email Settings sidebar.server-email=Email Settings
sidebar.server-email.descr=Click to configure email settings sidebar.server-email.descr=Click to configure email settings
sidebar.sidebar-server-settings=Server Settings sidebar.sidebar-server-settings=Server Settings
sidebar.profile-settings=Profile Settings
sidebar.profile-settings.descr=Click to configure user and group profile settings
sidebar.server2server-settings=Server to Server sidebar.server2server-settings=Server to Server
sidebar.server2server-settings.descr=Click to configure server to server settings sidebar.server2server-settings.descr=Click to configure server to server settings
sidebar.external-components-settings=External Components sidebar.external-components-settings=External Components
...@@ -2114,4 +2119,11 @@ calendar.time = Time: ...@@ -2114,4 +2119,11 @@ calendar.time = Time:
plugin.enterprise.download.error = Unable to download the Enterprise plugin. Please try again. plugin.enterprise.download.error = Unable to download the Enterprise plugin. Please try again.
plugin.enterprise.dont.show= Don't show this page again plugin.enterprise.dont.show= Don't show this page again
plugin.enterprise.installing = Installing Enterprise Plugin... plugin.enterprise.installing = Installing Enterprise Plugin...
plugin.enterprise.installed = Enterprise plugin installed successfully. Refreshing momentarily... plugin.enterprise.installed = Enterprise plugin installed successfully. Refreshing momentarily...
\ No newline at end of file
# Profile Settings
profile-settings.title=Profile Settings
profile-settings.info=Wildfire is currently using the following user and group system. When using \
LDAP it is possible to alter current integration settings.
profile-settings.ldap_mapping_info=LDAP Mapping Information
\ No newline at end of file
...@@ -33,6 +33,8 @@ tab.server.descr=Presione para administrar la configuraci\u00f3n del servidor ...@@ -33,6 +33,8 @@ tab.server.descr=Presione para administrar la configuraci\u00f3n del servidor
sidebar.server-email=Configuraci\u00f3n de Correo sidebar.server-email=Configuraci\u00f3n de Correo
sidebar.server-email.descr=Presione para configurar el correo sidebar.server-email.descr=Presione para configurar el correo
sidebar.sidebar-server-settings=Configuraci\u00f3n del Servidor sidebar.sidebar-server-settings=Configuraci\u00f3n del Servidor
sidebar.profile-settings=Seteos de Perfil
sidebar.profile-settings.descr=Presione para configurar los perfiles de usuarios y grupos
sidebar.server2server-settings=Servidor a Servidor sidebar.server2server-settings=Servidor a Servidor
sidebar.server2server-settings.descr=Presione para configurar las conexiones a otros servidores sidebar.server2server-settings.descr=Presione para configurar las conexiones a otros servidores
sidebar.external-components-settings=Componentes Externos sidebar.external-components-settings=Componentes Externos
...@@ -1833,4 +1835,11 @@ calendar.time = Hora: ...@@ -1833,4 +1835,11 @@ calendar.time = Hora:
plugin.enterprise.download.error = No se ha podido descarga el plugin Corporativo. Intente nuevamente. plugin.enterprise.download.error = No se ha podido descarga el plugin Corporativo. Intente nuevamente.
plugin.enterprise.dont.show= No mostrar esta p\u00e1gina nuevamente plugin.enterprise.dont.show= No mostrar esta p\u00e1gina nuevamente
plugin.enterprise.installing = Instalando Plugin Corporativo... plugin.enterprise.installing = Instalando Plugin Corporativo...
plugin.enterprise.installed = Plugin Corporativo instalado exitosamente. Refrescando en un instante... plugin.enterprise.installed = Plugin Corporativo instalado exitosamente. Refrescando en un instante...
\ No newline at end of file
# Profile Settings
profile-settings.title=Seteos de Perfil
profile-settings.info=Wildfire esta utilizando el siguiente sistema de usuarios y grupos. Al utilizar \
LDAP es posible cambiar la configuraci\u00f3n actual.
profile-settings.ldap_mapping_info=Informaci\u00f3n del Mapeo a LDAP
\ No newline at end of file
...@@ -52,6 +52,11 @@ ...@@ -52,6 +52,11 @@
<!-- Server Settings --> <!-- Server Settings -->
<sidebar id="sidebar-server-settings" name="${sidebar.sidebar-server-settings}"> <sidebar id="sidebar-server-settings" name="${sidebar.sidebar-server-settings}">
<!-- Profile Settings -->
<item id="profile-settings" name="${sidebar.profile-settings}"
url="profile-settings.jsp"
description="${sidebar.profile-settings.descr}" />
<!-- Server to server --> <!-- Server to server -->
<item id="server2server-settings" name="${sidebar.server2server-settings}" <item id="server2server-settings" name="${sidebar.server2server-settings}"
url="server2server-settings.jsp" url="server2server-settings.jsp"
......
<%@ page import="org.jivesoftware.util.JiveGlobals,
org.jivesoftware.util.ParamUtils" %>
<%@ page import="org.jivesoftware.wildfire.XMPPServer"%> <%@ page import="org.jivesoftware.wildfire.XMPPServer"%>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<% <%
// Redirect if we've already run setup: // Redirect if we've already run setup:
...@@ -17,228 +10,11 @@ ...@@ -17,228 +10,11 @@
<% <%
// Get parameters // Get parameters
boolean initialSetup = true;
String serverType = ParamUtils.getParameter(request, "serverType"); String currentPage = "setup-ldap-group.jsp";
// Server type should never be null, but if it is, assume "other" String testPage = "setup-ldap-group_test.jsp";
if (serverType == null) { String nextPage = "setup-admin-settings.jsp?ldap=true";
serverType = "other"; Map<String, String> meta = new HashMap<String, String>();
} meta.put("currentStep", "3");
// Determine the right default values based on the the server type.
String defaultGroupNameField = JiveGlobals.getXMLProperty("ldap.groupNameField");
String defaultGroupMemberField = JiveGlobals.getXMLProperty("ldap.groupMemberField");
String defaultGroupDescriptionField = JiveGlobals.getXMLProperty("ldap.groupDescriptionField");
String posixModeString = JiveGlobals.getXMLProperty("ldap.posixMode");
boolean defaultPosixMode = Boolean.parseBoolean(posixModeString);
String defaultGroupSearchFilter = JiveGlobals.getXMLProperty("ldap.groupSearchFilter");
if (serverType.equals("activedirectory")) {
if (defaultGroupNameField == null) {
defaultGroupNameField = "cn";
}
if (defaultGroupMemberField == null) {
defaultGroupMemberField = "member";
}
if (defaultGroupDescriptionField == null) {
defaultGroupDescriptionField = "description";
}
if (posixModeString == null) {
defaultPosixMode = false;
}
if (defaultGroupSearchFilter == null) {
defaultGroupSearchFilter = "(objectClass=group)";
}
} else {
if (defaultGroupNameField == null) {
defaultGroupNameField = "cn";
}
if (defaultGroupMemberField == null) {
defaultGroupMemberField = "member";
}
if (defaultGroupDescriptionField == null) {
defaultGroupDescriptionField = "description";
}
if (posixModeString == null) {
defaultPosixMode = false;
}
}
String groupNameField = ParamUtils.getParameter(request, "groupNameField");
if (groupNameField == null) {
groupNameField = defaultGroupNameField;
}
String groupMemberField = ParamUtils.getParameter(request, "groupMemberField");
if (groupMemberField == null) {
groupMemberField = defaultGroupMemberField;
}
String groupDescriptionField = ParamUtils.getParameter(request, "groupDescriptionField");
if (groupDescriptionField == null) {
groupDescriptionField = defaultGroupDescriptionField;
}
String posixModeParam = ParamUtils.getParameter(request, "posixMode");
boolean posixMode;
if (posixModeParam == null) {
posixMode = defaultPosixMode;
} else {
posixMode = Boolean.parseBoolean(posixModeParam);
}
String groupSearchFilter = ParamUtils.getParameter(request, "groupSearchFilter");
if (groupSearchFilter == null) {
groupSearchFilter = defaultGroupSearchFilter;
}
boolean save = request.getParameter("save") != null;
boolean doTest = request.getParameter("test") != null;
if (save || doTest) {
// Save information in the session so we can use it in testing pages during setup
Map<String, String> settings = new HashMap<String, String>();
settings.put("ldap.groupNameField", groupNameField);
settings.put("ldap.groupMemberField", groupMemberField);
settings.put("ldap.groupDescriptionField", groupDescriptionField);
settings.put("ldap.posixMode", Boolean.toString(posixMode));
settings.put("ldap.groupSearchFilter", groupSearchFilter);
session.setAttribute("ldapGroupSettings", settings);
if (save) {
if (groupNameField != null) {
JiveGlobals.setXMLProperty("ldap.groupNameField", groupNameField);
}
if (groupMemberField != null) {
JiveGlobals.setXMLProperty("ldap.groupMemberField", groupMemberField);
}
if (groupDescriptionField != null) {
JiveGlobals.setXMLProperty("ldap.groupDescriptionField", groupDescriptionField);
}
JiveGlobals.setXMLProperty("ldap.posixMode", Boolean.toString(posixMode));
if (groupSearchFilter != null) {
JiveGlobals.setXMLProperty("ldap.groupSearchFilter", groupSearchFilter);
}
// Enable the LDAP auth provider. The LDAP user provider will be enabled on the next step.
JiveGlobals.setXMLProperty("provider.group.className",
"org.jivesoftware.wildfire.ldap.LdapGroupProvider");
// Redirect
response.sendRedirect("setup-admin-settings.jsp?ldap=true");
return;
}
}
%> %>
<html> <%@ include file="ldap-group.jspf" %>
<head> \ No newline at end of file
<title><fmt:message key="setup.ldap.title" /></title>
<meta name="currentStep" content="3"/>
</head>
<body>
<% if (doTest) {
StringBuilder sb = new StringBuilder();
sb.append("serverType=").append(serverType);
/*if (isTesting) {
sb.append("&userIndex=").append(request.getParameter("userIndex"));
}*/
%>
<a href="setup-ldap-group_test.jsp?<%= sb.toString()%>" id="lbmessage" title="<fmt:message key="global.test" />" style="display:none;"></a>
<script type="text/javascript">
function loadMsg() {
var lb = new lightbox(document.getElementById('lbmessage'));
lb.activate();
}
setTimeout('loadMsg()', 250);
</script>
<% } %>
<h1><fmt:message key="setup.ldap.profile" />: <span><fmt:message key="setup.ldap.group_mapping" /></h1>
<!-- BEGIN jive-contentBox_stepbar -->
<div id="jive-contentBox_stepbar">
<span class="jive-stepbar_step"><em>1. <fmt:message key="setup.ldap.connection_settings" /></em></span>
<span class="jive-stepbar_step"><em>2. <fmt:message key="setup.ldap.user_mapping" /></em></span>
<span class="jive-stepbar_step"><strong>3. <fmt:message key="setup.ldap.group_mapping" /></strong></span>
</div>
<!-- END jive-contentBox-stepbar -->
<!-- BEGIN jive-contentBox -->
<div class="jive-contentBox jive-contentBox_for-stepbar">
<h2><fmt:message key="setup.ldap.step_three" />: <span><fmt:message key="setup.ldap.group_mapping" /></span></h2>
<p><fmt:message key="setup.ldap.group.description" /></p>
<form action="" method="get">
<!-- BEGIN jive-contentBox_bluebox -->
<div class="jive-contentBox_bluebox">
<table border="0" cellpadding="0" cellspacing="2">
<tr>
<td colspan="2"><strong><fmt:message key="setup.ldap.group_mapping" /></strong></td>
</tr>
<tr>
<td align="right"><fmt:message key="setup.ldap.group.name_field" />:</td>
<td><input type="text" name="groupNameField" id="jiveLDAPgroupname" size="22" maxlength="50" value="<%= groupNameField!=null?groupNameField:""%>"><span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.group.name_field_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></span></td>
</tr>
<tr>
<td align="right"><fmt:message key="setup.ldap.group.member_field" />:</td>
<td><input type="text" name="groupMemberField" id="jiveLDAPgroupmember" size="22" maxlength="50" value="<%= groupMemberField!=null?groupMemberField:""%>"><span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.group.member_field_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></span></td>
</tr>
<tr>
<td align="right"><fmt:message key="setup.ldap.group.description_field" />:</td>
<td><input type="text" name="groupDescriptionField" id="jiveLDAPgroupdesc" size="22" maxlength="50" value="<%= groupDescriptionField!=null?groupDescriptionField:""%>"><span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.group.description_field_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></span></td>
</tr>
</table>
<!-- BEGIN jiveAdvancedButton -->
<div class="jiveAdvancedButton jiveAdvancedButtonTopPad">
<a href="#" onclick="togglePanel(jiveAdvanced); return false;" id="jiveAdvancedLink"><fmt:message key="setup.ldap.advanced" /></a>
</div>
<!-- END jiveAdvancedButton -->
<!-- BEGIN jiveAdvancedPanelu (advanced user mapping settings) -->
<div class="jiveadvancedPanelu" id="jiveAdvanced" style="display: none;">
<div>
<table border="0" cellpadding="0" cellspacing="2">
<tr>
<td align="right"><fmt:message key="setup.ldap.group.posix" />:</td>
<td><span style="float: left;">
<input type="radio" name="posixMode" value="true" style="float: none;" id="posix1" <% if(posixMode) {%>checked<% } %>><label for="posix1"> <fmt:message key="global.yes" /> </label>
<input type="radio" name="posixMode" value="false" style="float: none;" id="posix2" <% if(!posixMode) {%>checked<% } %>><label for="posix2"> <fmt:message key="global.no" /> </label>
</span>
<span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.group.posix_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></span></td>
</tr>
<tr>
<td align="right"><fmt:message key="setup.ldap.group.filter" /></td>
<td><input type="text" name="groupSearchFilter" value="<%= groupSearchFilter!=null?groupSearchFilter:""%>" id="jiveLDAPgroupsearchfilter" size="22" maxlength="250"><span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.group.filter_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></span></td>
</tr>
</table>
</div>
</div>
<!-- END jiveAdvancedPanelu (advanced user mapping settings) -->
</div>
<!-- END jive-contentBox_bluebox -->
<!-- BEGIN jive-buttons -->
<div class="jive-buttons">
<!-- BEGIN right-aligned buttons -->
<div align="right">
<input type="Submit" name="test" value="<fmt:message key="setup.ldap.test" />" id="jive-setup-test" border="0">
<input type="Submit" name="save" value="<fmt:message key="setup.ldap.continue" />" id="jive-setup-save" border="0">
</div>
<!-- END right-aligned buttons -->
</div>
<!-- END jive-buttons -->
</form>
</div>
<!-- END jive-contentBox -->
</body>
</html>
<%@ page import="org.jivesoftware.util.JiveGlobals"%> <%@ page import="org.jivesoftware.wildfire.XMPPServer" %>
<%@ page import="org.jivesoftware.util.LocaleUtils"%>
<%@ page import="org.jivesoftware.util.ParamUtils, org.jivesoftware.wildfire.XMPPServer, java.util.HashMap, java.util.Map"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<% <%
// Redirect if we've already run setup: // Redirect if we've already run setup:
if (!XMPPServer.getInstance().isSetupMode()) { if (!XMPPServer.getInstance().isSetupMode()) {
response.sendRedirect("setup-completed.jsp"); response.sendRedirect("setup-completed.jsp");
return; return;
} }
...@@ -15,23 +9,7 @@ ...@@ -15,23 +9,7 @@
<% <%
String serverType = null; String serverType = null;
String host; if (request.getParameter("save") != null || request.getParameter("test") != null) {
int port = 389;
String baseDN;
String adminDN;
String adminPassword;
boolean connectionPoolEnabled = true;
boolean sslEnabled = false;
boolean debugEnabled = false;
boolean referralsEnabled = false;
// Get parameters
boolean save = request.getParameter("save") != null;
boolean test = request.getParameter("test") != null;
Map<String, String> errors = new HashMap<String, String>();
if (save || test) {
int serverTypeInt = ParamUtils.getIntParameter(request, "servertype", 1); int serverTypeInt = ParamUtils.getIntParameter(request, "servertype", 1);
switch (serverTypeInt) { switch (serverTypeInt) {
case 1: case 1:
...@@ -46,291 +24,13 @@ ...@@ -46,291 +24,13 @@
default: default:
serverType = "other"; serverType = "other";
} }
host = ParamUtils.getParameter(request, "host");
if (host == null) {
errors.put("host", LocaleUtils.getLocalizedString("setup.ldap.server.host_error"));
}
port = ParamUtils.getIntParameter(request, "port", port);
if (port <= 0) {
errors.put("port", LocaleUtils.getLocalizedString("setup.ldap.server.port_error"));
}
baseDN = ParamUtils.getParameter(request, "basedn");
if (baseDN == null) {
errors.put("baseDN", LocaleUtils.getLocalizedString("setup.ldap.server.basedn_error"));
}
adminDN = ParamUtils.getParameter(request, "admindn");
adminPassword = ParamUtils.getParameter(request, "adminpwd");
connectionPoolEnabled =
ParamUtils.getBooleanParameter(request, "connectionpool", connectionPoolEnabled);
sslEnabled = ParamUtils.getBooleanParameter(request, "ssl", sslEnabled);
debugEnabled = ParamUtils.getBooleanParameter(request, "debug", debugEnabled);
referralsEnabled = ParamUtils.getBooleanParameter(request, "referrals", referralsEnabled);
if (errors.isEmpty()) {
// Store settings in a map and keep it in the session
Map<String, String> settings = new HashMap<String, String>();
settings.put("ldap.serverType", serverType);
settings.put("ldap.host", host);
settings.put("ldap.port", Integer.toString(port));
settings.put("ldap.baseDN", baseDN);
settings.put("ldap.adminDN", adminDN);
settings.put("ldap.adminPassword", adminPassword);
settings.put("ldap.connectionPoolEnabled",
Boolean.toString(connectionPoolEnabled));
settings.put("ldap.sslEnabled", Boolean.toString(sslEnabled));
settings.put("ldap.debugEnabled", Boolean.toString(debugEnabled));
settings.put("ldap.autoFollowReferrals", Boolean.toString(referralsEnabled));
// Always disable connection pooling so that connections aren't left hanging open.
settings.put("ldap.connectionPoolEnabled", "false");
session.setAttribute("ldapSettings", settings);
if (save) {
// Save settings and redirect
JiveGlobals.setXMLProperty("ldap.host", host);
JiveGlobals.setXMLProperty("ldap.port", Integer.toString(port));
JiveGlobals.setXMLProperty("ldap.baseDN", baseDN);
JiveGlobals.setXMLProperty("ldap.adminDN", adminDN);
JiveGlobals.setXMLProperty("ldap.adminPassword", adminPassword);
JiveGlobals.setXMLProperty("ldap.connectionPoolEnabled",
Boolean.toString(connectionPoolEnabled));
JiveGlobals.setXMLProperty("ldap.sslEnabled", Boolean.toString(sslEnabled));
JiveGlobals.setXMLProperty("ldap.debugEnabled", Boolean.toString(debugEnabled));
JiveGlobals.setXMLProperty("ldap.autoFollowReferrals",
Boolean.toString(referralsEnabled));
// Redirect to next step.
response.sendRedirect("setup-ldap-user.jsp?serverType=" + serverType);
return;
}
}
} }
else {
// See if there are already values for the variables defined.
host = JiveGlobals.getXMLProperty("ldap.host");
port = JiveGlobals.getXMLProperty("ldap.port", port);
baseDN = JiveGlobals.getXMLProperty("ldap.baseDN");
adminDN = JiveGlobals.getXMLProperty("ldap.adminDN");
adminPassword = JiveGlobals.getXMLProperty("ldap.adminPassword");
connectionPoolEnabled =
JiveGlobals.getXMLProperty("ldap.connectionPoolEnabled", connectionPoolEnabled);
sslEnabled = JiveGlobals.getXMLProperty("ldap.sslEnabled", sslEnabled);
debugEnabled = JiveGlobals.getXMLProperty("ldap.debugEnabled", debugEnabled);
referralsEnabled = JiveGlobals.getXMLProperty("ldap.autoFollowReferrals", referralsEnabled);
}
%>
<html>
<head>
<title><fmt:message key="setup.ldap.title" /></title>
<meta name="currentStep" content="3"/>
</head>
<body>
<% if (test && errors.isEmpty()) { %>
<a href="setup-ldap-server_test.jsp?serverType=<%= serverType%>" id="lbmessage" title="<fmt:message key="global.test" />" style="display:none;"></a>
<script type="text/javascript">
function loadMsg() {
var lb = new lightbox(document.getElementById('lbmessage'));
lb.activate();
}
setTimeout('loadMsg()', 250);
</script>
<% } %>
<h1><fmt:message key="setup.ldap.profile" />: <span><fmt:message key="setup.ldap.connection_settings" /></span></h1>
<!-- BEGIN jive-contentBox_stepbar --> boolean initialSetup = true;
<div id="jive-contentBox_stepbar"> String currentPage = "setup-ldap-server.jsp";
<span class="jive-stepbar_step"><strong>1. <fmt:message key="setup.ldap.connection_settings" /></strong></span> String testPage = "setup-ldap-server_test.jsp?serverType="+ serverType;
<span class="jive-stepbar_step"><em>2. <fmt:message key="setup.ldap.user_mapping" /></em></span> String nextPage = "setup-ldap-user.jsp?serverType=" + serverType;
<span class="jive-stepbar_step"><em>3. <fmt:message key="setup.ldap.group_mapping" /></em></span> Map<String, String> meta = new HashMap<String, String>();
</div> meta.put("currentStep", "3");
<!-- END jive-contentBox-stepbar --> %>
<%@ include file="ldap-server.jspf" %>
<!-- BEGIN jive-contentBox -->
<div class="jive-contentBox jive-contentBox_for-stepbar">
<h2><fmt:message key="setup.ldap.step_one" />: <span><fmt:message key="setup.ldap.connection_settings" /></span></h2>
<p><fmt:message key="setup.ldap.server.description" /></p>
<% if (errors.size() > 0) { %>
<div class="error">
<% for (String error:errors.values()) { %>
<%= error%><br/>
<% } %>
</div>
<% } %>
<form action="setup-ldap-server.jsp" method="post">
<!-- BEGIN jive-contentBox_bluebox -->
<div class="jive-contentBox_bluebox">
<table border="0" cellpadding="0" cellspacing="2">
<tr>
<td colspan="4"><strong><fmt:message key="setup.ldap.server.ldap_server" /></strong></td>
</tr>
<tr>
<td align="right" width="1%" nowrap="nowrap"><fmt:message key="setup.ldap.server.type" />:</td>
<td colspan="3" nowrap>
<select name="servertype" size="1" id="jiveLDAPserverType" style="width:90%;">
<option value="1" <%= serverType == null ? "selected" : "" %>><fmt:message key="setup.ldap.server.type_select" /></option>
<option value="2" <%= "activedirectory".equals(serverType) ? "selected" : "" %>>Active Directory</option>
<option value="3" <%= "openldap".equals(serverType) ? "selected" : "" %>>OpenLDAP</option>
<option value="4" <%= "other".equals(serverType) ? "selected" : "" %>><fmt:message key="setup.ldap.server.type_other" /></option>
</select><span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.type_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></span>
</td>
</tr>
<tr>
<td align="right" width="1%" nowrap="nowrap"><fmt:message key="setup.ldap.server.host" />:</td>
<td width="1%">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="1%" nowrap="nowrap">
<input type="text" name="host" id="jiveLDAPphost" size="22" maxlength="50" value="<%= host!=null?host:"" %>">
</td>
<td width="99%">
<span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.host_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></span>
</td>
</tr>
</table>
</td>
<td align="right" width="1%" nowrap="nowrap">&nbsp;&nbsp; <fmt:message key="setup.ldap.server.port" />:</td>
<td><input type="text" name="port" id="jiveLDAPport" size="5" maxlength="5" value="<%= port %>"><span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.port_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></span></td>
</tr>
<tr>
<td align="right"><fmt:message key="setup.ldap.server.basedn" />:</td>
<td colspan="3">
<input type="text" name="basedn" id="jiveLDAPbasedn" size="40" maxlength="150" value="<%= baseDN!=null?baseDN:""%>" style="width:90%;">
<span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.basedn_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 16000);"></span>
</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="4"><strong><fmt:message key="setup.ldap.server.auth" />:</strong></td>
</tr>
<tr>
<td align="right" width="1%" nowrap="nowrap"><fmt:message key="setup.ldap.server.admindn" />:</td>
<td colspan="3">
<input type="text" name="admindn" id="jiveLDAPadmindn" size="40" maxlength="150" value="<%= adminDN!=null?adminDN:""%>" style="width:90%;">
<span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.admindn_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></span>
</td>
</tr>
<tr>
<td align="right" width="1%" nowrap="nowrap"><fmt:message key="setup.ldap.server.password" />:</td>
<td colspan="3"><input type="password" name="adminpwd" id="jiveLDAPadminpwd" size="22" maxlength="30" value="<%= adminPassword!=null?adminPassword:""%>"> <span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.password_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></span></td>
</tr>
</table>
</div>
<!-- END jive-contentBox_bluebox -->
<!-- BEGIN jiveAdvancedButton -->
<div class="jiveAdvancedButton">
<a href="#" onclick="togglePanel(jiveAdvanced); return false;" id="jiveAdvancedLink"><fmt:message key="setup.ldap.advanced" /></a>
</div>
<!-- END jiveAdvancedButton -->
<!-- BEGIN jiveAdvancedPanelcs (advanced connection settings) -->
<div class="jiveadvancedPanelcs" id="jiveAdvanced" style="display: none;">
<div>
<table border="0" cellpadding="0" cellspacing="1">
<thead>
<tr>
<th width="10%"></th>
<th></th>
<th width="50"><fmt:message key="global.yes" /></th>
<th width="50"><fmt:message key="global.no" /></th>
</tr>
</thead>
<tbody>
<tr>
<td class="jive-advancedLabel" nowrap>
<fmt:message key="setup.ldap.server.connection_pool" />:
</td>
<td class="jive-advancedDesc jive-advancedBorderBottom jive-advancedBorderRight">
<fmt:message key="setup.ldap.server.connection_pool_help" />
</td>
<td class="jive-advancedBorderBottom jive-advancedBorderRight" align="center">
<input type="radio" name="connectionpool" value="yes" <% if (connectionPoolEnabled) { %>checked <% } %>>
</td>
<td class="jive-advancedBorderBottom" align="center">
<input type="radio" name="connectionpool" value="no" <% if (!connectionPoolEnabled) { %>checked <% } %>>
</td>
</tr>
<tr>
<td class="jive-advancedLabel" nowrap>
<fmt:message key="setup.ldap.server.ssl" />:
</td>
<td class="jive-advancedDesc jive-advancedBorderBottom jive-advancedBorderRight">
<fmt:message key="setup.ldap.server.ssl_help" />
</td>
<td class="jive-advancedBorderBottom jive-advancedBorderRight" align="center">
<input type="radio" name="ssl" value="yes" <% if (sslEnabled) { %>checked <% } %>>
</td>
<td class="jive-advancedBorderBottom" align="center">
<input type="radio" name="ssl" value="no" <% if (!sslEnabled) { %>checked <% } %>>
</td>
</tr>
<tr>
<td class="jive-advancedLabel" nowrap>
<fmt:message key="setup.ldap.server.debug" />:
</td>
<td class="jive-advancedDesc jive-advancedBorderBottom jive-advancedBorderRight">
<fmt:message key="setup.ldap.server.debug_help" />
</td>
<td class="jive-advancedBorderBottom jive-advancedBorderRight" align="center">
<input type="radio" name="debug" value="yes" <% if (debugEnabled) { %>checked <% } %>>
</td>
<td class="jive-advancedBorderBottom" align="center">
<input type="radio" name="debug" value="no" <% if (!debugEnabled) { %>checked <% } %>>
</td>
</tr>
<tr>
<td class="jive-advancedLabel" nowrap>
<fmt:message key="setup.ldap.server.referral" />:
</td>
<td class="jive-advancedDesc jive-advancedBorderBottom jive-advancedBorderRight">
<fmt:message key="setup.ldap.server.referral_help" />
</td>
<td class="jive-advancedBorderBottom jive-advancedBorderRight" align="center">
<input type="radio" name="referrals" value="yes" <% if (referralsEnabled) { %>checked <% } %>>
</td>
<td class="jive-advancedBorderBottom" align="center">
<input type="radio" name="referrals" value="no" <% if (!referralsEnabled) { %>checked <% } %>>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- END jiveAdvancedPanelcs (advanced connection settings) -->
<!-- BEGIN jive-buttons -->
<div class="jive-buttons">
<!-- BEGIN right-aligned buttons -->
<div align="right">
<input type="Submit" name="test" value="<fmt:message key="setup.ldap.test" />" id="jive-setup-test" border="0">
<input type="Submit" name="save" value="<fmt:message key="setup.ldap.continue" />" id="jive-setup-save" border="0">
</div>
<!-- END right-aligned buttons -->
</div>
<!-- END jive-buttons -->
</form>
</div>
<!-- END jive-contentBox -->
</body>
</html>
<%@ page import="org.jivesoftware.admin.LdapUserProfile,
org.jivesoftware.util.BeanUtils,
org.jivesoftware.util.JiveGlobals,
org.jivesoftware.util.LocaleUtils" %>
<%@ page import="org.jivesoftware.util.ParamUtils"%>
<%@ page import="org.jivesoftware.wildfire.XMPPServer" %> <%@ page import="org.jivesoftware.wildfire.XMPPServer" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<jsp:useBean id="vcardBean" scope="session" class="org.jivesoftware.admin.LdapUserProfile" />
<% <%
// Redirect if we've already run setup: // Redirect if we've already run setup:
if (!XMPPServer.getInstance().isSetupMode()) { if (!XMPPServer.getInstance().isSetupMode()) {
response.sendRedirect("setup-completed.jsp"); response.sendRedirect("setup-completed.jsp");
return; return;
} }
%> %>
<% <%
// Get parameters boolean initialSetup = true;
String serverType = ParamUtils.getParameter(request, "serverType"); String currentPage = "setup-ldap-user.jsp";
// Server type should never be null, but if it is, assume "other" String testPage = "setup-ldap-user_test.jsp";
if (serverType == null) { String nextPage = "setup-ldap-group.jsp";
serverType = "other"; Map<String, String> meta = new HashMap<String, String>();
} meta.put("currentStep", "3");
// Determine the right default values based on the the server type.
String defaultUsernameField;
String defaultSearchFields;
String defaultSearchFilter;
// First check if the http session holds data from a previous post of this page
if (session.getAttribute("ldapUserSettings") != null && session.getAttribute("ldapVCardBean") != null) {
Map<String, String> userSettings = (Map<String, String>) session.getAttribute("ldapUserSettings");
defaultUsernameField = userSettings.get("ldap.usernameField");
defaultSearchFields = userSettings.get("ldap.searchFields");
defaultSearchFilter = userSettings.get("ldap.searchFilter");
vcardBean = (LdapUserProfile) session.getAttribute("ldapVCardBean");
}
else {
// No info in the session so try stored XML values or default ones
defaultUsernameField = JiveGlobals.getXMLProperty("ldap.usernameField");
defaultSearchFields = JiveGlobals.getXMLProperty("ldap.searchFields");
defaultSearchFilter = JiveGlobals.getXMLProperty("ldap.searchFilter");
if (serverType.equals("activedirectory")) {
if (!vcardBean.loadFromProperties()) {
// Initialize vCard mappings
vcardBean.initForActiveDirectory();
}
if (defaultUsernameField == null) {
defaultUsernameField = "sAMAccountName";
// Initialize vCard mappings
}
if (defaultSearchFilter == null) {
defaultSearchFilter = "(objectClass=organizationalPerson)";
}
} else {
if (!vcardBean.loadFromProperties()) {
// Initialize vCard mappings
vcardBean.initForOpenLDAP();
}
if (defaultUsernameField == null) {
defaultUsernameField = "uid";
}
}
}
String usernameField = defaultUsernameField;
String searchFields = defaultSearchFields;
String searchFilter = defaultSearchFilter;
Map<String, String> errors = new HashMap<String, String>();
boolean save = request.getParameter("save") != null;
boolean doTest = request.getParameter("test") != null;
boolean isTesting = request.getParameter("userIndex") != null;
if ((save || doTest) && !isTesting) {
usernameField = ParamUtils.getParameter(request, "usernameField");
if (usernameField == null) {
errors.put("username",
LocaleUtils.getLocalizedString("setup.ldap.user.username_field_error"));
}
searchFields = ParamUtils.getParameter(request, "searchFields");
searchFilter = ParamUtils.getParameter(request, "searchFilter");
// Set the properties to the vCard bean with the user input
BeanUtils.setProperties(vcardBean, request);
// Save settings and redirect.
if (errors.isEmpty()) {
// Save information in the session so we can use it in testing pages during setup
Map<String, String> settings = new HashMap<String, String>();
settings.put("ldap.usernameField", usernameField);
settings.put("ldap.searchFields", searchFields);
settings.put("ldap.searchFilter", searchFilter);
session.setAttribute("ldapUserSettings", settings);
session.setAttribute("ldapVCardBean", vcardBean);
if (save) {
JiveGlobals.setXMLProperty("ldap.usernameField", usernameField);
if (searchFields != null) {
JiveGlobals.setXMLProperty("ldap.searchFields", searchFields);
}
if (searchFilter != null) {
JiveGlobals.setXMLProperty("ldap.searchFilter", searchFilter);
}
// Save vCard mappings
vcardBean.saveProperties();
// Enable the LDAP auth and user providers. The group provider will be enabled on the next step.
JiveGlobals.setXMLProperty("provider.user.className",
"org.jivesoftware.wildfire.ldap.LdapUserProvider");
JiveGlobals.setXMLProperty("provider.auth.className",
"org.jivesoftware.wildfire.ldap.LdapAuthProvider");
// Redirect
response.sendRedirect("setup-ldap-group.jsp?serverType=" + serverType);
return;
}
}
}
%> %>
<html> <%@ include file="ldap-user.jspf" %>
<head> \ No newline at end of file
<title><fmt:message key="setup.ldap.title" /></title>
<meta name="currentStep" content="3"/>
</head>
<body>
<% if (doTest && errors.isEmpty()) {
StringBuilder sb = new StringBuilder();
sb.append("serverType=").append(serverType);
if (isTesting) {
sb.append("&userIndex=").append(request.getParameter("userIndex"));
}
%>
<a href="setup-ldap-user_test.jsp?<%= sb.toString()%>" id="lbmessage" title="<fmt:message key="global.test" />" style="display:none;"></a>
<script type="text/javascript">
function loadMsg() {
var lb = new lightbox(document.getElementById('lbmessage'));
lb.activate();
}
setTimeout('loadMsg()', 250);
</script>
<% } %>
<h1><fmt:message key="setup.ldap.profile" />: <span><fmt:message key="setup.ldap.user_mapping" /></h1>
<!-- BEGIN jive-contentBox_stepbar -->
<div id="jive-contentBox_stepbar">
<span class="jive-stepbar_step"><em>1. <fmt:message key="setup.ldap.connection_settings" /></em></span>
<span class="jive-stepbar_step"><strong>2. <fmt:message key="setup.ldap.user_mapping" /></strong></span>
<span class="jive-stepbar_step"><em>3. <fmt:message key="setup.ldap.group_mapping" /></em></span>
</div>
<!-- END jive-contentBox-stepbar -->
<!-- BEGIN jive-contentBox -->
<div class="jive-contentBox jive-contentBox_for-stepbar">
<h2><fmt:message key="setup.ldap.step_two" />: <span><fmt:message key="setup.ldap.user_mapping" /></span></h2>
<p><fmt:message key="setup.ldap.user.description" /></p>
<% if (errors.size() > 0) { %>
<div class="error">
<% for (String error:errors.values()) { %>
<%= error%><br/>
<% } %>
</div>
<% } %>
<form action="setup-ldap-user.jsp" method="post">
<input type="hidden" name="serverType" value="<%=serverType%>">
<!-- BEGIN jive-contentBox_bluebox -->
<div class="jive-contentBox_bluebox">
<table border="0" cellpadding="0" cellspacing="2">
<tr>
<td colspan="2"><strong><fmt:message key="setup.ldap.user_mapping" /></strong></td>
</tr>
<tr>
<td align="right"><fmt:message key="setup.ldap.user.username_field" />:</td>
<td><input type="text" name="usernameField" id="jiveLDAPusername" size="22" maxlength="50" value="<%= usernameField!=null?usernameField:""%>"><span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.user.username_field_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></span></td>
</tr>
</table>
<!-- BEGIN jiveAdvancedButton -->
<div class="jiveAdvancedButton jiveAdvancedButtonTopPad">
<a href="#" onclick="togglePanel(jiveAdvanced); return false;" id="jiveAdvancedLink"><fmt:message key="setup.ldap.advanced" /></a>
</div>
<!-- END jiveAdvancedButton -->
<!-- BEGIN jiveAdvancedPanelu (advanced user mapping settings) -->
<div class="jiveadvancedPanelu" id="jiveAdvanced" style="display: none;">
<div>
<table border="0" cellpadding="0" cellspacing="2">
<tr>
<td align="right"><fmt:message key="setup.ldap.user.search_fields" />:</td>
<td><input type="text" name="searchFields" value="<%= searchFields!=null?searchFields:""%>" id="jiveLDAPsearchfields" size="40" maxlength="250"><span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.user.search_fields_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></span></td>
</tr>
<tr>
<td align="right"><fmt:message key="setup.ldap.user.user_filter" />:</td>
<td><input type="text" name="searchFilter" value="<%= searchFilter!=null?searchFilter:""%>" id="jiveLDAPsearchfilter" size="40" maxlength="250"><span class="jive-setup-helpicon" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.user.user_filter_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></span></td>
</tr>
</table>
</div>
</div>
<!-- END jiveAdvancedPanelu (advanced user mapping settings) -->
</div>
<!-- END jive-contentBox_bluebox -->
<script type="text/javascript" language="JavaScript">
function jiveRowHighlight(theInput) {
var e = $(jivevCardTable).getElementsByTagName('tr');
for (var i = 0; i < e.length; i++) {
e[i].style.backgroundColor = "#fff";
}
theInput.parentNode.parentNode.style.backgroundColor = "#eaeff4";
}
</script>
<!-- BEGIN jive-contentBox_greybox -->
<div class="jive-contentBox_greybox">
<strong><fmt:message key="setup.ldap.user.vcard.mapping" /></strong>
<p><fmt:message key="setup.ldap.user.vcard.description" /></p>
<!-- BEGIN vcard table -->
<table border="0" cellpadding="0" cellspacing="1" class="jive-vcardTable" id="jivevCardTable">
<thead>
<tr>
<th width="40%"><fmt:message key="setup.ldap.user.vcard.label1" /></th>
<th width="60%"><fmt:message key="setup.ldap.user.vcard.label2" /></th>
</tr>
</thead>
<tbody>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
<strong><fmt:message key="setup.ldap.user.vcard.name" /></strong>
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="name" value="<%= vcardBean.getName() %>" id="name" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
<strong><fmt:message key="setup.ldap.user.vcard.email" /></strong>
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="email" value="<%= vcardBean.getEmail() %>" id="email" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
&nbsp;
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
&nbsp;
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
<strong><fmt:message key="setup.ldap.user.vcard.fullname" /></strong>
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="fullName" value="<%= vcardBean.getFullName() %>" id="fullName" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
<strong><fmt:message key="setup.ldap.user.vcard.nickname" /></strong>
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="nickname" value="<%= vcardBean.getNickname() %>" id="nickname" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
<strong><fmt:message key="setup.ldap.user.vcard.birthday" /></strong>
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="birthday" value="<%= vcardBean.getBirthday() %>" id="birthday" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
<strong><fmt:message key="setup.ldap.user.vcard.home" /></strong>
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
&nbsp;
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.street" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="homeStreet" value="<%= vcardBean.getHomeStreet() %>" id="homeStreet" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.city" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="homeCity" value="<%= vcardBean.getHomeCity() %>" id="homeCity" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.state" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="homeState" value="<%= vcardBean.getHomeState() %>" id="homeState" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.pcode" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="homeZip" value="<%= vcardBean.getHomeZip() %>" id="homeZip" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.country" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="homeCountry" value="<%= vcardBean.getHomeCountry() %>" id="homeCountry" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.phone" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="homePhone" value="<%= vcardBean.getHomePhone() %>" id="homePhone" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.mobile" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="homeMobile" value="<%= vcardBean.getHomeMobile() %>" id="homeMobile" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.fax" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="homeFax" value="<%= vcardBean.getHomeFax() %>" id="homeFax" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.pager" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="homePager" value="<%= vcardBean.getHomePager() %>" id="homePager" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
<strong><fmt:message key="setup.ldap.user.vcard.business" /></strong>
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
&nbsp;
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.street" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessStreet" value="<%= vcardBean.getBusinessStreet() %>" id="businessStreet" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.city" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessCity" value="<%= vcardBean.getBusinessCity() %>" id="businessCity" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.state" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessState" value="<%= vcardBean.getBusinessState() %>" id="businessState" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.pcode" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessZip" value="<%= vcardBean.getBusinessZip() %>" id="businessZip" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.country" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessCountry" value="<%= vcardBean.getBusinessCountry() %>" id="businessCountry" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.title" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessJobTitle" value="<%= vcardBean.getBusinessJobTitle() %>" id="businessJobTitle" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.department" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessDepartment" value="<%= vcardBean.getBusinessDepartment() %>" id="businessDepartment" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.phone" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessPhone" value="<%= vcardBean.getBusinessPhone() %>" id="businessPhone" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.mobile" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessMobile" value="<%= vcardBean.getBusinessMobile() %>" id="businessMobile" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.fax" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessFax" value="<%= vcardBean.getBusinessFax() %>" id="businessFax" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
<tr>
<td class="jive-vcardTable-label jive-vardBorderBottom jive-vardBorderRight" nowrap>
- <fmt:message key="setup.ldap.user.vcard.pager" />
</td>
<td class="jive-vcardTable-value jive-vardBorderBottom">
<input type="text" name="businessPager" value="<%= vcardBean.getBusinessPager() %>" id="businessPager" size="22" maxlength="50" onFocus="jiveRowHighlight(this);">
</td>
</tr>
</table>
<!-- END vcard table -->
</div>
<!-- END jive-contentBox_greybox -->
<!-- BEGIN jive-buttons -->
<div class="jive-buttons">
<!-- BEGIN right-aligned buttons -->
<div align="right">
<input type="Submit" name="test" value="<fmt:message key="setup.ldap.test" />" id="jive-setup-test" border="0">
<input type="Submit" name="save" value="<fmt:message key="setup.ldap.continue" />" id="jive-setup-save" border="0">
</div>
<!-- END right-aligned buttons -->
</div>
<!-- END jive-buttons -->
</form>
</div>
<!-- END jive-contentBox -->
</body>
</html>
...@@ -279,7 +279,7 @@ html>body .jive-testPanel { ...@@ -279,7 +279,7 @@ html>body .jive-testPanel {
</tr> </tr>
<tr> <tr>
<td colspan="2" class="jive-testpanel-vcard-next"> <td colspan="2" class="jive-testpanel-vcard-next">
<a href="setup-ldap-user.jsp?test=true&serverType=<%= ParamUtils.getParameter(request, "serverType")%>&userIndex=<%=userIndex%>"><fmt:message key="setup.ldap.user.vcard.test.random" /></a> <a href="<%= ParamUtils.getParameter(request, "currentPage")%>?test=true&serverType=<%= ParamUtils.getParameter(request, "serverType")%>&userIndex=<%=userIndex%>"><fmt:message key="setup.ldap.user.vcard.test.random" /></a>
</td> </td>
</tr> </tr>
</table> </table>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment