Commit df7944c4 authored by Ryan Graham's avatar Ryan Graham Committed by ryang

* Added the ability to disable specific fields from being searched.

* Added internationalization (i18n) support.
* Updated UI to match later versions of Wildfire.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@7393 b35dd754-fafc-0310-a699-88a17e54d16e
parent 1bd98d8d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<title>Search Plugin Changelog</title> <title>Search Plugin Changelog</title>
<style type="text/css"> <style type="text/css">
BODY { BODY {
font-size : 100%; font-size : 100%;
...@@ -44,9 +44,16 @@ ...@@ -44,9 +44,16 @@
Search Plugin Changelog Search Plugin Changelog
</h1> </h1>
<p><b>1.3.0</b> -- February 28, 2007</p>
<ul>
<li>Added the ability to disable specific fields from being searched.</li>
<li>Added internationalization (i18n) support.</li>
<li>Updated UI to match later versions of Wildfire.</li>
</ul>
<p><b>1.2.1</b> -- September 7, 2006</p> <p><b>1.2.1</b> -- September 7, 2006</p>
<ul> <ul>
<li>Search results no longer shows edit and delete if users are read-only.</li> <li>Search results no longer shows edit and delete if users are read-only.</li>
</ul> </ul>
<p><b>1.2.1</b> -- October 06, 2006</p> <p><b>1.2.1</b> -- October 06, 2006</p>
......
...@@ -3,26 +3,26 @@ ...@@ -3,26 +3,26 @@
<plugin> <plugin>
<class>org.jivesoftware.wildfire.plugin.SearchPlugin</class> <class>org.jivesoftware.wildfire.plugin.SearchPlugin</class>
<name>Search</name> <name>Search</name>
<description>Provides support for Jabber Search (JEP-0055)</description> <description>Provides support for Jabber Search (XEP-0055)</description>
<author>Ryan Graham</author> <author>Ryan Graham</author>
<version>1.2.1</version> <version>1.3.0</version>
<date>10/06/2006</date> <date>02/28/2007</date>
<minServerVersion>3.1.0</minServerVersion> <minServerVersion>3.1.0</minServerVersion>
<adminconsole> <adminconsole>
<tab id="tab-server"> <tab id="tab-server">
<sidebar id="sidebar-server-settings"> <sidebar id="sidebar-server-settings">
<item id="search-props-edit-form" name="Search Properties" <item id="search-props-edit-form" name="Search Properties"
url="search-props-edit-form.jsp" url="search-props-edit-form.jsp"
description="Edit search service properties" /> description="Edit search service properties" />
</sidebar> </sidebar>
</tab> </tab>
<tab id="tab-users"> <tab id="tab-users">
<sidebar id="sidebar-users"> <sidebar id="sidebar-users">
<item id="advance-user-search" name="Advanced User Search" <item id="advance-user-search" name="Advanced User Search"
url="advance-user-search.jsp" url="advance-user-search.jsp"
description="Advanced user search" /> description="Advanced user search" />
</sidebar> </sidebar>
</tab> </tab>
</adminconsole> </adminconsole>
</plugin> </plugin>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<title>Search Plugin Readme</title> <title>Search Plugin Readme</title>
<style type="text/css"> <style type="text/css">
BODY { BODY {
font-size : 100%; font-size : 100%;
...@@ -44,15 +44,13 @@ Search Plugin Readme ...@@ -44,15 +44,13 @@ Search Plugin Readme
</h1> </h1>
<h2>Overview</h2> <h2>Overview</h2>
<p> <p>
The search plugin adds Jabber Search <a href="http://www.jabber.org/jeps/jep-0055.html">JEP-0055</a> The search plugin adds Jabber Search <a href="http://www.xmpp.org/extensions/xep-0055.html">XEP-0055</a>
capabilities to Wildfire. This plugin is designed to work with various Jabber clients to allow capabilities to Wildfire. This plugin is designed to work with various Jabber clients to allow
other users to search for users currently registered on the same server they are. other users to search for users currently registered on the same server they are.
</p> </p>
<h2>Installation</h2> <h2>Installation</h2>
<p> <p>
Copy the file, &quot;search.jar&quot; into the plugins directory of your Wildfire installation. The plugin will Copy the file, &quot;search.jar&quot; into the plugins directory of your Wildfire installation. The plugin will
then be automatically deployed. To upgrade to a new version: 1) go to the plugin screen of the Admin then be automatically deployed. To upgrade to a new version: 1) go to the plugin screen of the Admin
...@@ -61,15 +59,16 @@ copy the new search.jar into the plugins directory of your Wildfire installation ...@@ -61,15 +59,16 @@ copy the new search.jar into the plugins directory of your Wildfire installation
</p> </p>
<h2>Configuration</h2> <h2>Configuration</h2>
<p>
The search plugin is configured via the "Search Service Properites" sidebar item located under the "Server" tab The search plugin is configured via the "Search Service Properites" sidebar item located under the "Server" tab
in the Wildfire Admin Console. By default, after the search plugin has been deployed all of its features in the Wildfire Admin Console. By default, after the search plugin has been deployed all of its features
are enabled. To enable or disable the plugin select the appropirate radio button and then click on the are enabled. To enable or disable the plugin select the appropirate radio button and then click on the
"Save Properties" button. To change the service name enter the new name for the service and then click on the "Save Properties" button. To change the service name enter the new name for the service and then click on the
"Save Properties" button "Save Properties" button. To disable a field from being searched by clients un-check the corresponding checkbox
and click on the "Save Properties" button.
</p>
<h2>Using the Plugin</h2> <h2>Using the Plugin</h2>
<p> <p>
Use of this plugin varies from client to client; however, basic instructions for accessing the search screen Use of this plugin varies from client to client; however, basic instructions for accessing the search screen
for some of the more popular clients are listed below. On the search screen there is a single for some of the more popular clients are listed below. On the search screen there is a single
...@@ -78,13 +77,16 @@ and/or email that you want to find. As an example, if you want to find your frie ...@@ -78,13 +77,16 @@ and/or email that you want to find. As an example, if you want to find your frie
if his last name is spelled "Smith" or "Smyth", try entering "John S*" in the search field and making if his last name is spelled "Smith" or "Smyth", try entering "John S*" in the search field and making
sure the name checkbox is selected. The "*" symbol acts as a wildcard so your search might return not sure the name checkbox is selected. The "*" symbol acts as a wildcard so your search might return not
only "John Smith" but all the users whose name begins with "John S", i.e. "John Slater", "John Salazar", etc. only "John Smith" but all the users whose name begins with "John S", i.e. "John Slater", "John Salazar", etc.
</p>
<li> <li>
Admin Console - Navigate to the "Advance User Search" sidebar item located in under the "Users/Groups" tab. Admin Console - Navigate to the "Advance User Search" sidebar item located in under the "Users/Groups" tab.
</li> </li>
<br> <br>
<li>
Spark - Use the search field along the bottom portion of the main Spark window.
</li>
<br>
<li> <li>
Exodus - After clicking on the magnifying glass with the red "+" sign, a screen will appear displaying the search Exodus - After clicking on the magnifying glass with the red "+" sign, a screen will appear displaying the search
service that will be used which will be used. Click on the "Next" button and the search screen will service that will be used which will be used. Click on the "Next" button and the search screen will
...@@ -109,6 +111,6 @@ view the search screen. ...@@ -109,6 +111,6 @@ view the search screen.
Psi - On the lower left-hand corner of the client, click on the main Psi toolbar, select "Service Discovery", and click on your username. After the service discovery windowappears, select the "User Search" entry and click on Psi - On the lower left-hand corner of the client, click on the main Psi toolbar, select "Service Discovery", and click on your username. After the service discovery windowappears, select the "User Search" entry and click on
the magnifying glass at the top of the window to view the search screen. the magnifying glass at the top of the window to view the search screen.
</li> </li>
<br> </p>
</body> </body>
</html> </html>
login.title=Admin Console
advance.user.search.title=User Search
advance.user.search.search_user=Search For User
advance.user.search.search=Search
advance.user.search.details=The following fields are available for searching. Wildcard (*) characters are allowed as part the of query.
advance.user.search.more_options=More Options
advance.user.search.less_options=Less Options
advance.user.search.users_found=Users Found
advance.user.search.online=Online
advance.user.search.username=Username
advance.user.search.name=Name
advance.user.search.created=Created
advance.user.search.edit=Edit
advance.user.search.delete=Delete
advance.user.search.no_users=No users in the system.
advance.user.search.available=Available
advance.user.search.chat_available=Free to chat
advance.user.search.away=Away
advance.user.search.extended=Extended away
advance.user.search.offline=Offline
search.props.edit.form.title=Search Service Properties
search.props.edit.form.directions=Use the form below to edit search service settings, these settings do not affect the user search in the admin console.
search.props.edit.form.successful_edit=Service properties edited successfully.
search.props.edit.form.error=Error setting the service name.
search.props.edit.form.service_enabled=Service Enabled
search.props.edit.form.service_enabled_directions=You can choose to enable or disable user searches from clients. Disabling this services does not prevent user searches from the admin console.
search.props.edit.form.enabled=Enabled
search.props.edit.form.enabled_details=Clients will be able to search for users.
search.props.edit.form.disabled=Disabled
search.props.edit.form.disabled_details=Clients will not be able to search for users.
search.props.edit.form.service_name=Service Name
search.props.edit.form.search_service_name=Search service Name
search.props.edit.form.search_service_name_details=Please enter a valid name.
search.props.edit.form.searchable_fields=Searchable Fields
search.props.edit.form.searchable_fields_details=Use the form below to enable which fields users can search on.
search.props.edit.form.fields=Fields
search.props.edit.form.save_properties=Save Properties
search.service_unavailable=This service is unavailable.
<%@ page import="java.util.*, <%@ page import="java.util.*,
java.net.URLEncoder, java.net.URLEncoder,
org.jivesoftware.util.*, org.jivesoftware.util.*,
org.jivesoftware.wildfire.PresenceManager, org.jivesoftware.wildfire.PresenceManager,
org.jivesoftware.wildfire.user.*, org.jivesoftware.wildfire.user.*,
org.jivesoftware.wildfire.XMPPServer, org.jivesoftware.wildfire.XMPPServer,
org.xmpp.packet.Presence" org.xmpp.packet.Presence"
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<html> <html>
<head> <head>
<title>User Search</title> <title><fmt:message key="advance.user.search.title" /></title>
<meta name="pageID" content="advance-user-search"/> <meta name="pageID" content="advance-user-search"/>
</head> </head>
<body> <body>
...@@ -48,52 +48,51 @@ ...@@ -48,52 +48,51 @@
<form name="f" action="advance-user-search.jsp"> <form name="f" action="advance-user-search.jsp">
<input type="hidden" name="search" value="true"/> <input type="hidden" name="search" value="true"/>
<input type="hidden" name="moreOptions" value="<%=moreOptions %>"/> <input type="hidden" name="moreOptions" value="<%=moreOptions %>"/>
<fieldset>
<legend><fmt:message key="user.search.search_user" /></legend> <div class="jive-contentBoxHeader"><fmt:message key="advance.user.search.search_user" /></div>
<div> <div class="jive-contentBox">
<table cellpadding="3" cellspacing="1" border="0" width="600"> <table cellpadding="3" cellspacing="1" border="0" width="600">
<tr class="c1"> <tr class="c1">
<td width="1%" colspan="2" nowrap> <td width="1%" colspan="2" nowrap>
Search: <fmt:message key="advance.user.search.search" />
&nbsp;<input type="text" name="criteria" value="<%=(criteria != null ? criteria : "") %>" size="30" maxlength="75"/> &nbsp;<input type="text" name="criteria" value="<%=(criteria != null ? criteria : "") %>" size="30" maxlength="75"/>
&nbsp;<input type="submit" name="search" value="<fmt:message key="user.search.search" />"/> &nbsp;<input type="submit" name="search" value="<fmt:message key="advance.user.search.search" />"/>
</td> </td>
</tr> </tr>
<% if (moreOptions) { %> <% if (moreOptions) { %>
<tr class="c1"> <tr class="c1">
<td width="1%" colspan="2" nowrap>Wildcard (*) characters are allowed as part the of query. The following fields are available for searching:</td> <td width="1%" colspan="2" nowrap><fmt:message key="advance.user.search.details" />:</td>
</tr> </tr>
<% for (String searchField : searchFields) { %> <% for (String searchField : searchFields) { %>
<tr class="c1"> <tr class="c1">
<td width="1%" nowrap><%=searchField %>:</td> <td width="1%" nowrap><%=searchField %>:</td>
<td class="c2"> <td class="c2">
<% if (criteria == null) { %> <% if (criteria == null) { %>
<input type="checkbox" checked name="<%=searchField %>"/> <input type="checkbox" checked name="<%=searchField %>"/>
<% } else { %> <% } else { %>
<input type="checkbox" <%=selectedFields.contains(searchField) ? "checked" : "" %> name="<%=searchField %>"/> <input type="checkbox" <%=selectedFields.contains(searchField) ? "checked" : "" %> name="<%=searchField %>"/>
<% } %> <% } %>
</td> </td>
</tr> </tr>
<% } %> <% } %>
<tr> <tr>
<td nowrap>&raquo;&nbsp;<a href="advance-user-search.jsp?moreOptions=false">Less Options</a></td> <td nowrap>&raquo;&nbsp;<a href="advance-user-search.jsp?moreOptions=false"><fmt:message key="advance.user.search.less_options" /></a></td>
</tr> </tr>
<% } else { %> <% } else { %>
<tr> <tr>
<td nowrap>&raquo;&nbsp;<a href="advance-user-search.jsp?moreOptions=true">More Options</a></td> <td nowrap>&raquo;&nbsp;<a href="advance-user-search.jsp?moreOptions=true"><fmt:message key="advance.user.search.more_options" /></a></td>
</tr> </tr>
<% } %> <% } %>
</table> </table>
</div> </div>
</fieldset> </form>
</form>
<% if (criteria != null) { %> <% if (criteria != null) { %>
<p> <p>
Users Found: <%=users.size() %> <fmt:message key="advance.user.search.users_found" />: <%=users.size() %>
</p> </p>
<div class="jive-table"> <div class="jive-table">
...@@ -101,14 +100,14 @@ Users Found: <%=users.size() %> ...@@ -101,14 +100,14 @@ Users Found: <%=users.size() %>
<thead> <thead>
<tr> <tr>
<th>&nbsp;</th> <th>&nbsp;</th>
<th nowrap><fmt:message key="session.details.online" /></th> <th nowrap><fmt:message key="advance.user.search.online" /></th>
<th nowrap><fmt:message key="user.create.username" /></th> <th nowrap><fmt:message key="advance.user.search.username" /></th>
<th nowrap><fmt:message key="user.create.name" /></th> <th nowrap><fmt:message key="advance.user.search.name" /></th>
<th nowrap><fmt:message key="user.summary.created" /></th> <th nowrap><fmt:message key="advance.user.search.created" /></th>
<% // Don't allow editing or deleting if users are read-only. <% // Don't allow editing or deleting if users are read-only.
if (!UserManager.getUserProvider().isReadOnly()) { %> if (!UserManager.getUserProvider().isReadOnly()) { %>
<th nowrap><fmt:message key="user.summary.edit" /></th> <th nowrap><fmt:message key="advance.user.search.edit" /></th>
<th nowrap><fmt:message key="global.delete" /></th> <th nowrap><fmt:message key="advance.user.search.delete" /></th>
<% } %> <% } %>
</tr> </tr>
</thead> </thead>
...@@ -116,14 +115,14 @@ Users Found: <%=users.size() %> ...@@ -116,14 +115,14 @@ Users Found: <%=users.size() %>
<% if (users.isEmpty()) { %> <% if (users.isEmpty()) { %>
<tr> <tr>
<td align="center" colspan="7"><fmt:message key="user.summary.not_user" /></td> <td align="center" colspan="7"><fmt:message key="advance.user.search.no_users" /></td>
</tr> </tr>
<% <%
} else { } else {
int i = 0; int i = 0;
PresenceManager presenceManager = XMPPServer.getInstance().getPresenceManager(); PresenceManager presenceManager = XMPPServer.getInstance().getPresenceManager();
for (User user : users) { for (User user : users) {
i++; i++;
%> %>
...@@ -136,26 +135,26 @@ Users Found: <%=users.size() %> ...@@ -136,26 +135,26 @@ Users Found: <%=users.size() %>
Presence presence = presenceManager.getPresence(user); Presence presence = presenceManager.getPresence(user);
if (presence.getShow() == null) { if (presence.getShow() == null) {
%> <img src="images/user-green-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="user.properties.available" />"> <% %> <img src="images/user-green-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="advance.user.search.available" />"> <%
} }
if (presence.getShow() == Presence.Show.chat) { if (presence.getShow() == Presence.Show.chat) {
%> <img src="images/user-green-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="session.details.chat_available" />"> <% %> <img src="images/user-green-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="advance.user.search.chat_available" />"> <%
} }
if (presence.getShow() == Presence.Show.away) { if (presence.getShow() == Presence.Show.away) {
%> <img src="images/user-yellow-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="session.details.away" />"> <% %> <img src="images/user-yellow-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="advance.user.search.away" />"> <%
} }
if (presence.getShow() == Presence.Show.xa) { if (presence.getShow() == Presence.Show.xa) {
%> <img src="images/user-yellow-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="session.details.extended" />"> <% %> <img src="images/user-yellow-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="advance.user.search.extended" />"> <%
} }
if (presence.getShow() == Presence.Show.dnd) { if (presence.getShow() == Presence.Show.dnd) {
%> <img src="images/user-red-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="session.details.not_disturb" />"> <% %> <img src="images/user-red-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="advance.user.search.not_disturb" />"> <%
} }
} else { } else {
%> <img src="images/user-clear-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="user.properties.offline" />"> <% %> <img src="images/user-clear-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="advance.user.search.offline" />"> <%
} }
%> %>
</td> </td>
......
<%@ page import="java.util.*, <%@ page import="java.util.*,
org.jivesoftware.wildfire.XMPPServer, org.jivesoftware.wildfire.XMPPServer,
org.jivesoftware.wildfire.plugin.SearchPlugin, org.jivesoftware.wildfire.plugin.SearchPlugin,
org.jivesoftware.wildfire.user.*,
org.jivesoftware.util.*" org.jivesoftware.util.*"
%> %>
...@@ -11,9 +12,9 @@ ...@@ -11,9 +12,9 @@
boolean save = request.getParameter("save") != null; boolean save = request.getParameter("save") != null;
boolean success = request.getParameter("success") != null; boolean success = request.getParameter("success") != null;
String searchName = ParamUtils.getParameter(request, "searchname"); String searchName = ParamUtils.getParameter(request, "searchname");
boolean searchEnabled = ParamUtils.getBooleanParameter(request, "searchEnabled"); boolean searchEnabled = ParamUtils.getBooleanParameter(request, "searchEnabled");
SearchPlugin plugin = (SearchPlugin) XMPPServer.getInstance().getPluginManager().getPlugin("search"); SearchPlugin plugin = (SearchPlugin) XMPPServer.getInstance().getPluginManager().getPlugin("search");
// Handle a save // Handle a save
Map errors = new HashMap(); Map errors = new HashMap();
...@@ -23,8 +24,17 @@ ...@@ -23,8 +24,17 @@
} }
if (errors.size() == 0) { if (errors.size() == 0) {
plugin.setServiceEnabled(searchEnabled); plugin.setServiceEnabled(searchEnabled);
plugin.setServiceName(searchName.trim()); plugin.setServiceName(searchName.trim());
ArrayList<String> excludedFields = new ArrayList<String>();
for (String field : UserManager.getInstance().getSearchFields()) {
if (!ParamUtils.getBooleanParameter(request, field)) {
excludedFields.add(field);
}
}
plugin.setExcludedFields(excludedFields);
response.sendRedirect("search-props-edit-form.jsp?success=true"); response.sendRedirect("search-props-edit-form.jsp?success=true");
return; return;
} }
...@@ -38,17 +48,18 @@ ...@@ -38,17 +48,18 @@
} }
searchEnabled = plugin.getServiceEnabled(); searchEnabled = plugin.getServiceEnabled();
Collection<String> searchableFields = plugin.getFilteredSearchFields();
%> %>
<html> <html>
<head> <head>
<title>Search Service Properties</title> <title><fmt:message key="search.props.edit.form.title" /></title>
<meta name="pageID" content="search-props-edit-form"/> <meta name="pageID" content="search-props-edit-form"/>
</head> </head>
<body> <body>
<p> <p>
Use the form below to edit search service settings, these settings do not affect the user search in the admin console.<br> <fmt:message key="search.props.edit.form.directions" />
</p> </p>
<% if (success) { %> <% if (success) { %>
...@@ -58,7 +69,7 @@ Use the form below to edit search service settings, these settings do not affect ...@@ -58,7 +69,7 @@ Use the form below to edit search service settings, these settings do not affect
<tbody> <tbody>
<tr><td class="jive-icon"><img src="images/success-16x16.gif" width="16" height="16" border="0"></td> <tr><td class="jive-icon"><img src="images/success-16x16.gif" width="16" height="16" border="0"></td>
<td class="jive-icon-label"> <td class="jive-icon-label">
Service properties edited successfully. <fmt:message key="search.props.edit.form.successful_edit" />
</td></tr> </td></tr>
</tbody> </tbody>
</table> </table>
...@@ -71,7 +82,7 @@ Use the form below to edit search service settings, these settings do not affect ...@@ -71,7 +82,7 @@ Use the form below to edit search service settings, these settings do not affect
<tbody> <tbody>
<tr><td class="jive-icon"><img src="images/error-16x16.gif" width="16" height="16" border="0"></td> <tr><td class="jive-icon"><img src="images/error-16x16.gif" width="16" height="16" border="0"></td>
<td class="jive-icon-label"> <td class="jive-icon-label">
Error setting the service name. <fmt:message key="search.props.edit.form.error" />
</td></tr> </td></tr>
</tbody> </tbody>
</table> </table>
...@@ -81,11 +92,10 @@ Use the form below to edit search service settings, these settings do not affect ...@@ -81,11 +92,10 @@ Use the form below to edit search service settings, these settings do not affect
<form action="search-props-edit-form.jsp?save" method="post"> <form action="search-props-edit-form.jsp?save" method="post">
<fieldset> <div class="jive-contentBoxHeader"><fmt:message key="search.props.edit.form.service_enabled" /></div>
<legend>Service Enabled</legend> <div class="jive-contentBox">
<div>
<p> <p>
You can choose to enable or disable user searches from clients. Disabling this services does not prevent user searches from the admin console. <fmt:message key="search.props.edit.form.service_enabled_directions" />
</p> </p>
<table cellpadding="3" cellspacing="0" border="0" width="100%"> <table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody> <tbody>
...@@ -95,7 +105,7 @@ Use the form below to edit search service settings, these settings do not affect ...@@ -95,7 +105,7 @@ Use the form below to edit search service settings, these settings do not affect
<%= ((searchEnabled) ? "checked" : "") %>> <%= ((searchEnabled) ? "checked" : "") %>>
</td> </td>
<td width="99%"> <td width="99%">
<label for="rb01"><b>Enabled</b></label> - Clients will be able to search for users. <label for="rb01"><b><fmt:message key="search.props.edit.form.enabled" /></b></label> - <fmt:message key="search.props.edit.form.enabled_details" />
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -104,24 +114,21 @@ Use the form below to edit search service settings, these settings do not affect ...@@ -104,24 +114,21 @@ Use the form below to edit search service settings, these settings do not affect
<%= ((!searchEnabled) ? "checked" : "") %>> <%= ((!searchEnabled) ? "checked" : "") %>>
</td> </td>
<td width="99%"> <td width="99%">
<label for="rb02"><b>Disabled</b></label> - Clients will not be able to search for users. <label for="rb02"><b><fmt:message key="search.props.edit.form.disabled" /></b></label> - <fmt:message key="search.props.edit.form.disabled_details" />
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</fieldset>
<br><br> <br>
<fieldset> <div class="jive-contentBoxHeader"><fmt:message key="search.props.edit.form.service_name" /></div>
<legend>Service Name</legend> <div class="jive-contentBox">
<div>
<table cellpadding="3" cellspacing="0" border="0"> <table cellpadding="3" cellspacing="0" border="0">
<tr> <tr>
<td class="c1"> <td class="c1">
Search service name: <fmt:message key="search.props.edit.form.search_service_name" />:
</td> </td>
<td> <td>
<input type="text" size="30" maxlength="150" name="searchname" value="<%= (searchName != null ? searchName : "") %>">.<%=XMPPServer.getInstance().getServerInfo().getName() %> <input type="text" size="30" maxlength="150" name="searchname" value="<%= (searchName != null ? searchName : "") %>">.<%=XMPPServer.getInstance().getServerInfo().getName() %>
...@@ -129,19 +136,39 @@ Use the form below to edit search service settings, these settings do not affect ...@@ -129,19 +136,39 @@ Use the form below to edit search service settings, these settings do not affect
<% if (errors.containsKey("searchname")) { %> <% if (errors.containsKey("searchname")) { %>
<span class="jive-error-text"> <span class="jive-error-text">
<br>Please enter a valid name. <br><fmt:message key="search.props.edit.form.search_service_name_details" />
</span> </span>
<% } %> <% } %>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</fieldset>
<br>
<div class="jive-contentBoxHeader"><fmt:message key="search.props.edit.form.searchable_fields" /></div>
<div class="jive-contentBox">
<p>
<fmt:message key="search.props.edit.form.searchable_fields_details" />
</p>
<table class="jive-table" cellpadding="3" cellspacing="0" border="0" width="400">
<tr>
<th align="center" width="1%"><fmt:message key="search.props.edit.form.enabled" /></th>
<th align="left" width="99%"><fmt:message key="search.props.edit.form.fields" /></th>
</tr>
<% for (String field : UserManager.getInstance().getSearchFields()) { %>
<tr>
<td align="center" width="1%"><input type="checkbox" <%=searchableFields.contains(field) ? "checked" : "" %> name="<%=field %>"></td>
<td align="left" width="99%"><%=field %></td>
</tr>
<% } %>
</table>
</div>
<br><br> <br>
<input type="submit" value="Save Properties"> <input type="submit" value="<fmt:message key="search.props.edit.form.save_properties" />">
</form> </form>
</body> </body>
......
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