Commit 612c363d authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Initial version. JM-877

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5816 b35dd754-fafc-0310-a699-88a17e54d16e
parent bc2f4615
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %>
<%
boolean initialSetup = false;
String currentPage = "ldap-group.jsp";
String testPage = "setup/setup-ldap-group_test.jsp";
String nextPage = "profile-settings.jsp";
Map<String, String> meta = new HashMap<String, String>();
meta.put("pageID", "profile-settings");
%>
<style type="text/css" title="setupStyle" media="screen">
@import "style/lightbox.css";
@import "style/ldap.css";
</style>
<script language="JavaScript" type="text/javascript" src="js/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="js/scriptaculous.js"></script>
<script language="JavaScript" type="text/javascript" src="js/lightbox.js"></script>
<script language="javascript" type="text/javascript" src="js/tooltips/domLib.js"></script>
<script language="javascript" type="text/javascript" src="js/tooltips/domTT.js"></script>
<script language="javascript" type="text/javascript" src="js/setup.js"></script>
<%@ include file="setup/ldap-group.jspf" %>
\ No newline at end of file
<%
String serverType = null;
boolean initialSetup = false;
String currentPage = "ldap-server.jsp";
String testPage = "setup/setup-ldap-server_test.jsp";
String nextPage = "ldap-user.jsp";
Map<String, String> meta = new HashMap<String, String>();
meta.put("pageID", "profile-settings");
%>
<style type="text/css" title="setupStyle" media="screen">
@import "style/lightbox.css";
@import "style/ldap.css";
</style>
<script language="JavaScript" type="text/javascript" src="js/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="js/scriptaculous.js"></script>
<script language="JavaScript" type="text/javascript" src="js/lightbox.js"></script>
<script language="javascript" type="text/javascript" src="js/tooltips/domLib.js"></script>
<script language="javascript" type="text/javascript" src="js/tooltips/domTT.js"></script>
<script language="javascript" type="text/javascript" src="js/setup.js"></script>
<%@ include file="setup/ldap-server.jspf" %>
\ No newline at end of file
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %>
<%
boolean initialSetup = false;
String currentPage = "ldap-user.jsp";
String testPage = "setup/setup-ldap-user_test.jsp";
String nextPage = "ldap-group.jsp";
Map<String, String> meta = new HashMap<String, String>();
meta.put("pageID", "profile-settings");
%>
<style type="text/css" title="setupStyle" media="screen">
@import "style/lightbox.css";
@import "style/ldap.css";
</style>
<script language="JavaScript" type="text/javascript" src="js/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="js/scriptaculous.js"></script>
<script language="JavaScript" type="text/javascript" src="js/lightbox.js"></script>
<script language="javascript" type="text/javascript" src="js/tooltips/domLib.js"></script>
<script language="javascript" type="text/javascript" src="js/tooltips/domTT.js"></script>
<script language="javascript" type="text/javascript" src="js/setup.js"></script>
<%@ include file="setup/ldap-user.jspf" %>
\ No newline at end of file
<%@ page import="org.jivesoftware.util.JiveGlobals" %>
<%@ page import="org.jivesoftware.wildfire.ldap.LdapManager" %>
<%--
- $RCSfile$
- $Revision: $
- $Date: $
-
- Copyright (C) 2006 Jive Software. All rights reserved.
-
- This software is published under the terms of the GNU Public License (GPL),
- a copy of which is included in this distribution.
--%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<%
// Get parameters
boolean edit = request.getParameter("edit") != null;
if (edit) {
// Redirect to first step.
response.sendRedirect("ldap-server.jsp");
return;
}
%>
<html>
<head>
<title><fmt:message key="profile-settings.title"/></title>
<meta name="pageID" content="profile-settings"/>
</head>
<body>
<%
boolean isLDAP = "org.jivesoftware.wildfire.ldap.LdapAuthProvider".equals(
JiveGlobals.getXMLProperty("provider.auth.className"));
StringBuilder sb = new StringBuilder();
for (String host : LdapManager.getInstance().getHosts()) {
sb.append(host).append(", ");
}
String hosts = sb.toString();
if (hosts.trim().length() > 0) {
hosts = hosts.substring(0, hosts.length()-2);
}
int port = LdapManager.getInstance().getPort();
String baseDN = LdapManager.getInstance().getBaseDN();
String adminDN = LdapManager.getInstance().getAdminDN();
%>
<p>
<fmt:message key="profile-settings.info"/>
</p>
<form action="profile-settings.jsp" method="post">
<!--<div class="jive-contentBoxHeader">
</div>-->
<div class="jive-contentBox" style="-moz-border-radius: 3px;">
<table cellpadding="3" cellspacing="3" border="0">
<tbody>
<tr>
<td width="1%" nowrap>
<input type="radio" <%= isLDAP ? "disabled" : "readonly"%>
<%= (isLDAP ? "" : "checked") %>>
</td>
<td width="99%">
<b><fmt:message key="setup.profile.default" /></b> - <fmt:message key="setup.profile.default_description" />
</td>
</tr>
<tr>
<td width="1%" nowrap>
<input type="radio" <%= isLDAP ? "readonly" : "disabled"%>
<%= (isLDAP ? "checked" : "") %>>
</td>
<td width="99%">
<b><fmt:message key="setup.profile.ldap" /></b> - <fmt:message key="setup.profile.ldap_description" />
</td>
</tr>
<% if (isLDAP) { %>
<tr>
<td width="1%" nowrap>
&nbsp;
</td>
<td width="99%">
<table class="jive-table" cellpadding="0" cellspacing="0" border="0" width="98%" align="right">
<thead>
<tr>
<th colspan="2"><fmt:message key="profile-settings.ldap_mapping_info" /></th>
</tr>
</thead>
<tbody>
<tr>
<td class="c1">
<fmt:message key="setup.ldap.server.host" />:
</td>
<td class="c2">
<%= hosts %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="setup.ldap.server.port" />:
</td>
<td class="c2">
<%= port %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="setup.ldap.server.basedn" />:
</td>
<td class="c2">
<%= baseDN %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="setup.ldap.server.admindn" />:
</td>
<td class="c2">
<%= adminDN %>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="edit" value="<fmt:message key="server.properties.edit" />">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<% } %>
</tbody>
</table>
</div>
</form>
</body>
</html>
<%@ page import="org.jivesoftware.util.JiveGlobals,
org.jivesoftware.util.ParamUtils" %>
<%@ 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" %>
<%
// Get parameters
String serverType = ParamUtils.getParameter(request, "serverType");
// Server type should never be null, but if it is, assume "other"
if (serverType == null) {
serverType = "other";
}
// 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(nextPage);
return;
}
}
%>
<html>
<head>
<title><fmt:message key="setup.ldap.title" /></title>
<% for (Map.Entry<String, String> entry : meta.entrySet()) { %>
<meta name="<%= entry.getKey()%>" content="<%= entry.getValue()%>"/>
<% } %>
</head>
<body>
<% if (doTest) {
StringBuilder sb = new StringBuilder();
sb.append(testPage);
sb.append("?serverType=").append(serverType);
%>
<a href="<%= 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>
<% } %>
<% if (initialSetup) { %>
<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="<%= initialSetup ? "setup.ldap.continue" : "global.save_settings"%>" />" 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.util.LocaleUtils"%>
<%@ page import="org.jivesoftware.util.ParamUtils, 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" %>
<%
String host;
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) {
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(nextPage);
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>
<% for (Map.Entry<String, String> entry : meta.entrySet()) { %>
<meta name="<%= entry.getKey()%>" content="<%= entry.getValue()%>"/>
<% } %>
</head>
<body>
<% if (test && errors.isEmpty()) { %>
<a href="<%= testPage%>" 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>
<% } %>
<% if (initialSetup) { %>
<h1><fmt:message key="setup.ldap.profile" />: <span><fmt:message key="setup.ldap.connection_settings" /></span></h1>
<% } %>
<!-- BEGIN jive-contentBox_stepbar -->
<div id="jive-contentBox_stepbar">
<span class="jive-stepbar_step"><strong>1. <fmt:message key="setup.ldap.connection_settings" /></strong></span>
<span class="jive-stepbar_step"><em>2. <fmt:message key="setup.ldap.user_mapping" /></em></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_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="<%= currentPage%>" 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>
<% if (initialSetup) { %>
<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="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" />
<%
// Get parameters
String serverType = ParamUtils.getParameter(request, "serverType");
// Server type should never be null, but if it is, assume "other"
if (serverType == null) {
serverType = "other";
}
// 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(nextPage + "?serverType=" + serverType);
return;
}
}
}
%>
<html>
<head>
<title><fmt:message key="setup.ldap.title" /></title>
<% for (Map.Entry<String, String> entry : meta.entrySet()) { %>
<meta name="<%= entry.getKey()%>" content="<%= entry.getValue()%>"/>
<% } %>
</head>
<body>
<% if (doTest && errors.isEmpty()) {
StringBuilder sb = new StringBuilder();
sb.append(testPage);
sb.append("?serverType=").append(serverType);
sb.append("&currentPage=").append(currentPage);
if (isTesting) {
sb.append("&userIndex=").append(request.getParameter("userIndex"));
}
%>
<a href="<%= 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>
<% } %>
<% if (initialSetup) { %>
<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="<%= currentPage%>" 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>
/* styles specific to the 'stepbar' (seen on the LDAP screens) */
#jive-contentBox_stepbar {
display: block;
margin: 5px 0 0 0;
padding: 3px;
border: 1px solid #aec2d6;
background-color: #eaf1f8;
color: #09345b;
font-size: 8pt;
}
#jive-contentBox_stepbar span {
margin-right: 32px;
}
#jive-contentBox_stepbar span strong {
color: #09345b;
}
#jive-contentBox_stepbar span em {
color: #666;
font-style: normal;
}
/* contentBox style, used with 'stepbar' above (seen on the LDAP screens) */
.jive-contentBox_for-stepbar {
margin: 0 0 20px 0;
border-top: 0;
-moz-border-radius: 0 0 4px 4px;
}
.jive-contentBox_for-stepbar h2 {
font-size: 14pt;
color: #396b9c;
}
.jive-contentBox_for-stepbar h2 span {
font-size: 10pt;
color: #000;
}
/* blue div container (seen on the LDAP screens) */
.jive-contentBox_bluebox {
display: block;
position: relative;
border: 1px solid #dcdcdc;
background-color: #eaeff4;
-moz-border-radius: 3px;
margin: 0 0 12px 0;
padding: 12px;
}
.jive-contentBox_bluebox strong {
display: block;
position: relative;
color: #09345b;
padding-bottom: 3px;
}
/* grey div container (seen on the LDAP screens) */
.jive-contentBox_greybox {
display: block;
position: relative;
border: 1px solid #dcdcdc;
background-color: #ececec;
-moz-border-radius: 3px;
margin: 0 0 12px 0;
padding: 12px;
}
.jive-contentBox_greybox strong {
display: block;
position: relative;
color: #09345b;
padding-bottom: 3px;
}
/* form elements for LDAP */
.jive-contentBox td select {
z-index: 10;
float: left;
}
.jive-contentBox td input {
float: left;
}
.jive-contentBox td select#jiveLDAPserverType,
.jive-contentBox td input#jiveLDAPbasedn,
.jive-contentBox td input#jiveLDAPadmindn {
width: 320px;
}
.jive-contentBox td input#jiveLDAPhost,
.jive-contentBox td input#jiveLDAPadminpwd,
.jive-contentBox td input#jiveLDAPusername,
.jive-contentBox td input#jiveLDAPgroupname,
.jive-contentBox td input#jiveLDAPgroupmember,
.jive-contentBox td input#jiveLDAPgroupdesc,
.jive-contentBox td input#jiveLDAPgroupsearchfilter{
width: 160px;
}
.jive-contentBox td input#jiveLDAPsearchfields,
.jive-contentBox td input#jiveLDAPsearchfilter {
width: 220px;
}
.jive-contentBox td label {
margin-right: 5px;
}
/* button to toggle the advanced settings panel */
.jiveAdvancedButton {
display: block;
position: relative;
width: auto;
clear: both;
margin-top: 0;
}
.jiveAdvancedButton a {
padding: 2px 0 2px 14px;
margin: 0 0 5px 0;
background: url('../images/twisty_closed_9x9.gif') no-repeat left;
background-position: 1px;
color: #34679a;
}
a.jiveAdvancedButtonOn {
background: transparent url('../images/twisty_opened_9x9.gif') no-repeat left;
background-position: 1px;
}
.jiveAdvancedButtonTopPad {
margin-top: 7px;
}
/* advanced settings panel (for Connection Settings) */
.jiveadvancedPanelcs {
display: block;
position: relative;
clear: both;
width: 100%;
background: #ececec;
border: 1px solid #dcdcdc;
margin: 5px 0 10px 0;
padding: 0;
overflow: hidden;
-moz-border-radius: 4px;
}
.jiveadvancedPanelcs div {
margin: 12px;
}
.jiveadvancedPanelcs div table {
background-color: #fff;
border: 1px solid #ccc;
}
.jiveadvancedPanelcs div table th,
.jiveadvancedPanelcs div table td {
font-size: 11px;
padding: 3px 5px 3px 5px;
}
.jiveadvancedPanelcs div table th,
.jive-vcardTable th {
color: #fff;
font-weight: bold;
background-color: #82a1bc;
}
.jiveadvancedPanelcs div table td.jive-advancedLabel {
color: #09345b;
font-weight: bold;
background-color: #eaeff4;
text-align: right;
}
.jiveadvancedPanelcs div table td.jive-advancedDesc {
color: #333;
}
.jiveadvancedPanelcs div table td.jive-advancedCenter {
text-align: center;
}
.jiveadvancedPanelcs div table td input {
float: none;
}
.jiveadvancedPanelcs div table td.jive-advancedBorderBottom,
.jive-vcardTable td.jive-vardBorderBottom {
border-bottom: 1px solid #e8e8e8;
}
.jiveadvancedPanelcs div table td.jive-advancedBorderRight,
.jive-vcardTable td.jive-vardBorderRight {
border-right: 1px solid #e8e8e8;
}
.jiveadvancedPanelu {
margin-top: 8px;
width: 97%;
background-color: #fafafa;
border: 1px solid #dcdcdc;
-moz-border-radius: 3px;
padding: 8px;
}
.jiveadvancedPanelu td {
white-space: nowrap;
}
.jive-vcardTable {
width: 90%;
background-color: #fff;
border: 1px solid #ccc;
}
html>body .jive-vcardTable {
width: 100%;
}
.jive-vcardTable th,
.jive-vcardTable td {
font-size: 11px;
padding: 2px 5px 2px 5px;
}
.jive-vcardTable th {
text-align: left;
}
.jive-vcardTable td.jive-vcardTable-label,
.jive-vcardTable td.jive-vcardTable-label strong {
color: #333;
}
.jive-vcardTable td.jive-vcardTable-value input {
font-size: 10px;
width: 230px;
}
/* language selection specific styles */
#jive-setup-language {
padding: 0 0 10px 18px;
}
#jive-setup-language p {
line-height: 180%;
}
/* form buttons throughout setup process */
.jive-buttons {
padding-top: 15px;
}
.jive-contentBox input#jive-setup-save {
padding: 2px 5px 2px 5px;
margin: 0;
font-size: 11px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #fff;
border: 1px solid #7c7c7c;
background: #d6892c url(../images/setup_btn_bg-orange.gif) repeat-x;
}
.jive-contentBox input#jive-setup-skip,
.jive-contentBox input#jive-setup-back {
padding: 2px 5px 2px 5px;
margin: 0 10px 0 0;
font-size: 11px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #fff;
border: 1px solid #7c7c7c;
background: #8c8c8c url(../images/setup_btn_bg-grey.gif) repeat-x;
}
.jive-contentBox input#jive-setup-test {
padding: 2px 5px 2px 5px;
margin: 0 0 0 0;
font-size: 11px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #fff;
border: 1px solid #7c7c7c;
background: #8c8c8c url(../images/setup_btn_bg-grey.gif) repeat-x;
}
.jive-contentBox button#jive-setup-test img {
vertical-align: text-top;
margin: 0;
padding: 0;
border: 0;
}
.jive-contentBox a#jive-setup-test2 {
padding: 3px 5px 3px 5px;
margin: 0 10px 0 0;
font-size: 11px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #fff;
border: 1px solid #7c7c7c;
text-decoration: none;
background: #8c8c8c url(../images/setup_btn_bg-grey.gif) repeat-x;
}
.jive-contentBox a#jive-setup-test2 img {
vertical-align: text-top;
margin: 0;
padding: 0;
border: 0;
}
.jive-description {
display: block;
clear: both;
font-size: 11px;
}
.error {
color : #900;
font-weight : bold;
background-color : #EDB9B1;
padding : 5px;
border: 1px solid #BB8888;
margin-top : 10px;
margin-bottom: 20px;
padding-left : 28px;
background-image : url(../../images/error-16x16.gif);
background-repeat : no-repeat;
background-position : 5px 5px;
-moz-border-radius: 3px;
}
.jive_setup_launchAdmin a,
.jive_setup_launchAdmin a:visited {
position: relative;
padding: 6px 9px 6px 9px;
margin: 20px 0 0 0;
font-size: 13px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #fff;
border: 1px solid #0c2d4c;
background: #255480 url(../images/setup_btn_bg-bigblue.gif) repeat-x;
text-decoration: none;
-moz-border-radius: 4px;
}
/* --------------------------------------------- */
/* Tooltip styles */
/* --------------------------------------------- */
.jive-setup-helpicon {
display: block;
float: left;
width: 17px;
height: 17px;
margin: 3px 0px 0px 5px;
background: transparent url(../images/setup_helpicon.gif) no-repeat;
}
div.jiveTooltip {
position: absolute;
width: 330px;
padding: 6px;
background-color: #f9f5d5;
border: 1px solid #999;
text-align: left;
z-index: 20;
-moz-border-radius: 0;
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=92);
-moz-opacity: .92;
-khtml-opacity: .92;
}
div.jiveTooltip .contents {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333;
margin: 0;
padding: 0 3px;
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
-moz-opacity: 1;
-khtml-opacity: 1;
}
/* --------------------------------------------- */
/* Test settings panel */
/* --------------------------------------------- */
.jive-testPanel {
display: block;
position: relative;
float: left;
margin: 0;
padding: 0;
border: 2px solid #666666;
background-color: #f8f7eb;
overflow: hidden;
z-index: 9997;
-moz-border-radius: 6px;
}
.jive-testPanel-content {
display: block;
float: left;
padding: 20px;
font-size: 8pt;
z-index: 9999;
}
.jive-testPanel-close a,
.jive-testPanel-close a:visited {
float: right;
color: #666;
padding: 2px 5px 2px 18px;
margin: 0;
font-size: 8pt;
background: transparent url(../images/setup_btn_closetestx.gif) no-repeat left;
background-position: 4;
border: 1px solid #ccc;
z-index: 9999;
}
.jive-testPanel-close a:hover {
background-color: #e9e8d9;
}
.jive-testPanel-content h2 {
font-size: 14pt;
color: #396b9c;
margin: 0 0 10px 0;
padding: 0;
}
.jive-testPanel-content h2 span {
font-size: 10pt;
color: #000;
}
.jive-testPanel-content h4 {
font-size: 12pt;
margin: 0 0 10px 0;
padding: 0;
}
.jive-testPanel-content h4.jive-testSuccess {
color: #1e7100;
}
.jive-testPanel-content h4.jive-testError {
color: #890000;
}
.jive-testpanel-vcard {
display: block;
float: left;
width: 682px;
border: 1px solid #d8d7c6;
padding: 4px;
background-color: #fff;
}
.jive-testTable-vcard {
float: left;
}
.jive-testpanel-vcard-header {
border: 1px solid #dddddd;
background-color: #eaeaea;
font-weight: bold;
padding: 1px 2px 1px 4px;
font-size: 8pt;
}
.jive-testpanel-vcard-label {
text-align: right;
padding: 1px 2px 1px 6px;
color: #666;
font-size: 8pt;
}
.jive-testpanel-vcard-value {
text-align: left;
padding: 1px 8px 1px 2px;
font-size: 8pt;
}
.jive-testpanel-vcard-value a {
color: #34679a;
}
.jive-testpanel-vcard-value strong {
color: #890000;
}
.jive-testpanel-vcard-next {
text-align: right;
padding-top: 12px;
}
.jive-testpanel-vcard-next a {
display: block;
float: right;
font-weight: bold;
padding-right: 18px;
margin-right: 4px;
background: transparent url(../images/setup_nextprofile.gif) no-repeat right;
color: #34679a;
text-decoration: none;
}
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