Commit 1e5b8043 authored by Matt Tucker's avatar Matt Tucker Committed by matt

i18n and other work.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5554 b35dd754-fafc-0310-a699-88a17e54d16e
parent af7dc63e
...@@ -1342,19 +1342,21 @@ setup.profile.ldap_description=Integrate with a directory server such as Active ...@@ -1342,19 +1342,21 @@ setup.profile.ldap_description=Integrate with a directory server such as Active
# Setup LDAP pages # Setup LDAP pages
setup.ldap.title=Profile Settings setup.ldap.title=Profile Settings - Directory Server
setup.ldap.profile=Profile Settings
setup.ldap.connection_settings=Connection Settings setup.ldap.connection_settings=Connection Settings
setup.ldap.user_mapping=User Mapping setup.ldap.user_mapping=User Mapping
setup.ldap.group_mapping=Group Mapping setup.ldap.group_mapping=Group Mapping
setup.ldap.step_one=Step 1 of 3 setup.ldap.step_one=Step 1 of 3
setup.ldap.step_two=Step 2 of 3
setup.ldap.step_three=Step 3 of 3
setup.ldap.continue=Save & Continue setup.ldap.continue=Save & Continue
setup.ldap.test=Test Settings setup.ldap.test=Test Settings
setup.ldap.advanced=Advanced Settings
setup.ldap.server.title=Profile Settings - Directory Server
setup.ldap.server.description=Configure connection settings for your LDAP directory below. All \ setup.ldap.server.description=Configure connection settings for your LDAP directory below. All \
fields are required; if you need additional information about a field, hover your mouse over \ fields are required; if you need additional information about a field, hover your mouse over \
the corresponsing help icon. the corresponsing help icon.
setup.ldap.server.settings=LDAP Connection Settings
setup.ldap.server.ldap_server=LDAP Server setup.ldap.server.ldap_server=LDAP Server
setup.ldap.server.type=Server Type setup.ldap.server.type=Server Type
setup.ldap.server.type_select=--Select directory server type-- setup.ldap.server.type_select=--Select directory server type--
...@@ -1378,7 +1380,6 @@ setup.ldap.server.admindn_help=The full DN of a directory administrator. All dir ...@@ -1378,7 +1380,6 @@ setup.ldap.server.admindn_help=The full DN of a directory administrator. All dir
directory as read-only. If this property is not set, an anonymous login to the server will be attempted. directory as read-only. If this property is not set, an anonymous login to the server will be attempted.
setup.ldap.server.password=Password setup.ldap.server.password=Password
setup.ldap.server.password_help=The password for the directory administrator. setup.ldap.server.password_help=The password for the directory administrator.
setup.ldap.server.advanced=Advanced Settings
setup.ldap.server.connection_pool=Use Connection Pool setup.ldap.server.connection_pool=Use Connection Pool
setup.ldap.server.connection_pool_help=Connection Pooling. Default is 'Yes' setup.ldap.server.connection_pool_help=Connection Pooling. Default is 'Yes'
setup.ldap.server.ssl=Use SSL setup.ldap.server.ssl=Use SSL
...@@ -1388,6 +1389,51 @@ setup.ldap.server.debug_help=Write trace information about LDAP connections to S ...@@ -1388,6 +1389,51 @@ setup.ldap.server.debug_help=Write trace information about LDAP connections to S
setup.ldap.server.referral=Follow Referrals setup.ldap.server.referral=Follow Referrals
setup.ldap.server.referral_help=Automatically follow LDAP referrals when found setup.ldap.server.referral_help=Automatically follow LDAP referrals when found
setup.ldap.user.description=Configure user mapping settings for your LDAP directory below. \
If you need additional information about a field, hover your mouse over the corresponsing help icon.
setup.ldap.user.username_field=Username Field
setup.ldap.user.username_field_description=The field name that the username lookups will be \
performed on. If this property is not set, the default value is <b>uid</b>. Active Directory \
users should try the default value <b>sAMAccountName</b>.
setup.ldap.user.username_field_error=Enter a valid username field.
setup.ldap.user.search_fields=Search Fields
setup.ldap.user.search_fields_description=The LDAP fields that will be used for user searches. It \
is not recommended that you set a value for this field unless the default search fields does not \
work for you (username, name, and email fields). An example search value is \
&quot;Username/uid,Name/cname&quot;. That searches the uid and cname fields in the directory and \
labels them as &quot;Username&quot; and &quot;Name&quot; in the search UI. You can add as many \
fields as you would like using comma-delimited &quot;DisplayName/Field&quot; pairs. You should \
ensure that any fields used for searching are properly indexed so that searches return quickly.
setup.ldap.user.user_filter=User Filter
setup.ldap.user.user_filter_description=An optional user filter to append to the default filter \
when loading users. The default user filter is created using the attribute specified by \
ldap.usernameField. For example, if the username field is &quot;uid&quot;, then the default \
user filter would be &quot;(uid={0})&quot; where {0} is dynamically replaced with the username \
being searched for.
setup.ldap.group.description=Configure group mapping settings for your LDAP directory below. \
If you need additional information about a field, hover your mouse over the corresponsing help icon.
setup.ldap.group.name_field=Name Field
setup.ldap.group.name_field_description=The field name that the group name lookups will be \
performed on. If this property is not set, the default value is <b>cn</b>.
setup.ldap.group.member_field=Member Field
setup.ldap.group.member_field_description=The field name that holds the members in a group. If \
this property is not set, the default value is <b>member</b>.
setup.ldap.group.description_field=Description Field
setup.ldap.group.description_field_description=The field name that holds the description a group. \
If this property is not set, the default value is <b>description</b>.
setup.ldap.group.posix=Posix Mode
setup.ldap.group.posix_description=A value of &quot;true&quot; means that users are stored within \
the group by their user name alone. A value of &quot;false&quot; means that users are stored by \
their entire DN within the group. If this property is not set, the default value is <b>false</b>. \
The posix mode must be set correctly for your server in order for group integration to work.
setup.ldap.group.filter=Group Filter
setup.ldap.group.filter_description=An optional group filter to append to the default filter when \
loading groups. The default group filter is created using the attribute specified by \
ldap.groupNameField. For example, if the group name field is &quot;cn&quot;, then the default \
group filter would be &quot;(cn={0})&quot; where {0} is dynamically replaced with the \
group name being searched for.
# Setup finished Page # Setup finished Page
setup.finished.title=Setup Complete! setup.finished.title=Setup Complete!
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
<span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.group.posix_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td> <span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.group.posix_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td>
</tr> </tr>
<tr> <tr>
<td align="right">'<fmt:message key="setup.ldap.group.filter" /></td> <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="30"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.group.filter_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td> <td><input type="text" name="groupSearchFilter" value="<%= groupSearchFilter!=null?groupSearchFilter:""%>" id="jiveLDAPgroupsearchfilter" size="22" maxlength="30"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.group.filter_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td>
</tr> </tr>
</table> </table>
......
...@@ -103,13 +103,13 @@ ...@@ -103,13 +103,13 @@
%> %>
<html> <html>
<head> <head>
<title><fmt:message key="setup.ldap.server.title" /></title> <title><fmt:message key="setup.ldap.title" /></title>
<meta name="currentStep" content="3"/> <meta name="currentStep" content="3"/>
</head> </head>
<body> <body>
<h1><fmt:message key="setup.ldap.title" /> <span><fmt:message key="setup.ldap.server.settings" /></span></h1> <h1><fmt:message key="setup.ldap.profile" /> <span><fmt:message key="setup.ldap.connection_settings" /></span></h1>
<!-- BEGIN jive-contentBox_stepbar --> <!-- BEGIN jive-contentBox_stepbar -->
<div id="jive-contentBox_stepbar"> <div id="jive-contentBox_stepbar">
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
<% } %> <% } %>
</div> </div>
<% } %> <% } %>
<form action="setup-ldap-server.jsp" method="post"> <form action="setup-ldap-server.jsp" method="post">
<!-- BEGIN jive-contentBox_bluebox --> <!-- BEGIN jive-contentBox_bluebox -->
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
<!-- BEGIN jiveAdvancedButton --> <!-- BEGIN jiveAdvancedButton -->
<div class="jiveAdvancedButton"> <div class="jiveAdvancedButton">
<a href="#" onclick="togglePanel(jiveAdvanced); return false;" id="jiveAdvancedLink"><fmt:message key="setup.ldap.server.advanced" /></a> <a href="#" onclick="togglePanel(jiveAdvanced); return false;" id="jiveAdvancedLink"><fmt:message key="setup.ldap.advanced" /></a>
</div> </div>
<!-- END jiveAdvancedButton --> <!-- END jiveAdvancedButton -->
......
<%@ page import="org.jivesoftware.util.*, <%@ page import="org.jivesoftware.util.*,
java.util.HashMap, java.util.HashMap,
java.util.Map, java.util.Map,
java.util.Date,
org.jivesoftware.wildfire.user.User,
org.jivesoftware.wildfire.user.UserManager,
org.jivesoftware.util.JiveGlobals" %> org.jivesoftware.util.JiveGlobals" %>
<%@ page import="org.jivesoftware.wildfire.XMPPServer"%> <%@ page import="org.jivesoftware.wildfire.XMPPServer"%>
<%@ page import="org.jivesoftware.wildfire.auth.AuthFactory"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
...@@ -45,23 +41,23 @@ ...@@ -45,23 +41,23 @@
} }
} }
String usernameField = ParamUtils.getParameter(request, "usernameField"); String usernameField = defaultUsernameField;
if (usernameField == null) { String searchFields = defaultSearchFields;
usernameField = defaultUsernameField; String searchFilter = defaultSearchFilter;
}
String searchFields = ParamUtils.getParameter(request, "searchFields"); Map<String, String> errors = new HashMap<String, String>();
if (searchFields == null) {
searchFields = defaultSearchFields;
}
String searchFilter = ParamUtils.getParameter(request, "searchFilter");
if (searchFilter == null) {
searchFilter = defaultSearchFilter;
}
System.out.println(searchFilter);
boolean save = request.getParameter("save") != null; boolean save = request.getParameter("save") != null;
if (save) { if (save) {
// Save settings. 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");
// Save settings and redirect.
if (errors.isEmpty()) {
JiveGlobals.setXMLProperty("ldap.usernameField", usernameField); JiveGlobals.setXMLProperty("ldap.usernameField", usernameField);
JiveGlobals.setXMLProperty("ldap.searchFields", searchFields); JiveGlobals.setXMLProperty("ldap.searchFields", searchFields);
JiveGlobals.setXMLProperty("ldap.searchFilter", searchFilter); JiveGlobals.setXMLProperty("ldap.searchFilter", searchFilter);
...@@ -74,33 +70,42 @@ ...@@ -74,33 +70,42 @@
response.sendRedirect("setup-ldap-group.jsp?serverType=" + serverType); response.sendRedirect("setup-ldap-group.jsp?serverType=" + serverType);
return; return;
} }
}
%> %>
<html> <html>
<head> <head>
<title>Profile Settings - Directory Server</title> <title><fmt:message key="setup.ldap.title" /></title>
<meta name="currentStep" content="3"/> <meta name="currentStep" content="3"/>
</head> </head>
<body> <body>
<h1>Profile Settings <span>- User Mapping</span></h1> <h1><fmt:message key="setup.ldap.profile" /> <span><fmt:message key="setup.ldap.user_mapping" /></h1>
<p>Configure user mapping and user profiles.</p>
<!-- BEGIN jive-contentBox_stepbar --> <!-- BEGIN jive-contentBox_stepbar -->
<div id="jive-contentBox_stepbar"> <div id="jive-contentBox_stepbar">
<span class="jive-stepbar_step">1. Connection Settings</span> <span class="jive-stepbar_step"><em>1. <fmt:message key="setup.ldap.connection_settings" /></em></span>
<span class="jive-stepbar_step"><strong>2. User Mapping</strong></span> <span class="jive-stepbar_step"><strong>2. <fmt:message key="setup.ldap.user_mapping" /></strong></span>
<span class="jive-stepbar_step"><em>3. Group Mapping</em></span> <span class="jive-stepbar_step"><em>3. <fmt:message key="setup.ldap.group_mapping" /></em></span>
</div> </div>
<!-- END jive-contentBox-stepbar --> <!-- END jive-contentBox-stepbar -->
<!-- BEGIN jive-contentBox --> <!-- BEGIN jive-contentBox -->
<div class="jive-contentBox jive-contentBox_for-stepbar"> <div class="jive-contentBox jive-contentBox_for-stepbar">
<h2>Step 2 of 3: <span>User Mapping</span></h2> <h2><fmt:message key="setup.ldap.step_two" />: <span><fmt:message key="setup.ldap.user_mapping" /></span></h2>
<p>A sentance detailing the setup options below. Also, noting that the usermapping field is <strong>required</strong>. Lorem ipsum dolor siet amet. Also mention the help tooltip rollovers.</p> <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"> <form action="setup-ldap-user.jsp" method="post">
<input type="hidden" name="serverType" value="<%=serverType%>"> <input type="hidden" name="serverType" value="<%=serverType%>">
...@@ -109,17 +114,17 @@ ...@@ -109,17 +114,17 @@
<table border="0" cellpadding="0" cellspacing="2"> <table border="0" cellpadding="0" cellspacing="2">
<tr> <tr>
<td colspan="2"><strong>User Mapping</strong></td> <td colspan="2"><strong><fmt:message key="setup.ldap.user_mapping" /></strong></td>
</tr> </tr>
<tr> <tr>
<td align="right">Username:</td> <td align="right"><fmt:message key="setup.ldap.user.username_field" />:</td>
<td><input type="text" name="usernameField" id="jiveLDAPusername" size="22" maxlength="30" value="<%= usernameField!=null?usernameField:""%>"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', 'The field name that the username lookups will be performed on. If this property is not set, the default value is <b>uid</b>. Active Directory users should try the default value <b>sAMAccountName</b>', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td> <td><input type="text" name="usernameField" id="jiveLDAPusername" size="22" maxlength="40" value="<%= usernameField!=null?usernameField:""%>"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.user.username_field_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td>
</tr> </tr>
</table> </table>
<!-- BEGIN jiveAdvancedButton --> <!-- BEGIN jiveAdvancedButton -->
<div class="jiveAdvancedButton jiveAdvancedButtonTopPad"> <div class="jiveAdvancedButton jiveAdvancedButtonTopPad">
<a href="#" onclick="togglePanel(jiveAdvanced); return false;" id="jiveAdvancedLink">Advanced Settings</a> <a href="#" onclick="togglePanel(jiveAdvanced); return false;" id="jiveAdvancedLink"><fmt:message key="setup.ldap.advanced" /></a>
</div> </div>
<!-- END jiveAdvancedButton --> <!-- END jiveAdvancedButton -->
...@@ -128,12 +133,12 @@ ...@@ -128,12 +133,12 @@
<div> <div>
<table border="0" cellpadding="0" cellspacing="2"> <table border="0" cellpadding="0" cellspacing="2">
<tr> <tr>
<td align="right">Search Fields:</td> <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="22" maxlength="100"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', 'The LDAP fields that will be used for user searches. It is not recommended that you set a value for this field unless the default search fields does not work for you (username, name, and email fields). An example search value is &quot;Username/uid,Name/cname&quot;. That searches the uid and cname fields in the directory and labels them as &quot;Username&quot; and &quot;Name&quot; in the search UI. You can add as many fields as you\'d like using comma-delimited &quot;DisplayName/Field&quot; pairs. You should ensure that any fields used for searching are properly indexed so that searches return quickly.', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td> <td><input type="text" name="searchFields" value="<%= searchFields!=null?searchFields:""%>" id="jiveLDAPsearchfields" size="40" maxlength="100"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.user.search_fields_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td>
</tr> </tr>
<tr> <tr>
<td align="right">Search Filter:</td> <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="22" maxlength="100"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', 'An optional search filter to append to the default filter when loading users. The default search filter is created using the attribute specified by ldap.usernameField. For example, if the username field is &quot;uid&quot;, then the default search filter would be &quot;(uid={0})&quot; where {0} is dynamically replaced with the username being searched for.', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td> <td><input type="text" name="searchFilter" value="<%= searchFilter!=null?searchFilter:""%>" id="jiveLDAPsearchfilter" size="40" maxlength="100"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.user.user_filter_description" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -416,20 +421,14 @@ ...@@ -416,20 +421,14 @@
<!-- BEGIN jive-buttons --> <!-- BEGIN jive-buttons -->
<div class="jive-buttons"> <div class="jive-buttons">
<!-- BEGIN left-aligned buttons -->
<div align="left" style="float: left;">
<input type="Submit" name="back" value="Back" id="jive-setup-back" border="0">
</div>
<!-- END left-aligned buttons -->
<!-- BEGIN right-aligned buttons --> <!-- BEGIN right-aligned buttons -->
<div align="right"> <div align="right">
<a href="setup-ldap-user_test.jsp" class="lbOn" id="jive-setup-test2"> <a href="setup-ldap-user_test.jsp" class="lbOn" id="jive-setup-test2">
<img src="../images/setup_btn_gearplay.gif" alt="" width="14" height="14" border="0"> <img src="../images/setup_btn_gearplay.gif" alt="" width="14" height="14" border="0">
Test Settings <fmt:message key="setup.ldap.test" />
</a> </a>
<input type="Submit" name="save" value="Save & Continue" id="jive-setup-save" border="0"> <input type="Submit" name="save" value="<fmt:message key="setup.ldap.continue" />" id="jive-setup-save" border="0">
</div> </div>
<!-- END right-aligned buttons --> <!-- END right-aligned buttons -->
......
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