Allow admin to enable remote search (off by default)

This commit is contained in:
Miles Lott 2002-03-19 02:44:15 +00:00
parent cef59ed231
commit f34041b922
5 changed files with 42 additions and 9 deletions

View File

@ -296,6 +296,7 @@
$this->template->set_block('addressbook_list_t','addressbook_header','addressbook_header');
$this->template->set_block('addressbook_list_t','column','column');
$this->template->set_block('addressbook_list_t','row','row');
$this->template->set_block('addressbook_list_t','remsearch','remsearch');
$this->template->set_block('addressbook_list_t','addressbook_footer','addressbook_footer');
$customfields = $this->read_custom_fields();
@ -472,8 +473,6 @@
$this->start, $total_records,'&menuaction=addressbook.uiaddressbook.index&fcat_id='.$this->cat_id,'75%',
$GLOBALS['phpgw_info']['theme']['th_bg'],1,1,1,1,$this->cat_id);
$search_remote = $this->remote_search_option();
$lang_showing = $GLOBALS['phpgw']->nextmatchs->show_hits($total_records,$this->start);
/* set basic vars and parse the header */
@ -486,12 +485,8 @@
$this->template->set_var('lang_go',lang('Go'));
$this->template->set_var('searchreturn',$noprefs . ' ' . $searchreturn);
$this->template->set_var('remote_search',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.remote_search'));
$this->template->set_var('remote_query',$GLOBALS['HTTP_POST_VARS']['remote_query']);
$this->template->set_var('lang_remote_search',lang('Remote Search'));
$this->template->set_var('lang_showing',$lang_showing);
$this->template->set_var('search_filter',$search_filter);
$this->template->set_var('search_remote',$search_remote);
$this->template->set_var('cats',lang('Category'));
$this->template->set_var('cats_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'));
/* $this->template->set_var('cats_link',$this->cat_option($this->cat_id)); */
@ -521,6 +516,18 @@
$this->template->set_var('qfield',$qfield);
$this->template->set_var('cols',$cols);
if(@isset($GLOBALS['phpgw_info']['server']['enable_remote_addressbook']))
{
$this->template->set_var('remote_search',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.remote_search'));
$this->template->set_var('remote_query',$GLOBALS['HTTP_POST_VARS']['remote_query']);
$this->template->set_var('lang_remote_search',lang('Remote Search'));
$this->template->set_var('search_remote',$this->remote_search_option());
$this->template->fp('remotesearch','remsearch');
}
else
{
$this->template->set_var('remotesearch','');
}
$this->template->pparse('out','addressbook_header');
/* Show the entries */

View File

@ -40,6 +40,7 @@ department common en Department
download export file (uncheck to debug output in browser) addressbook en Download export file (Uncheck to debug output in browser)
edit custom field addressbook en Edit Custom Field
edit custom fields admin en Edit Custom Fields
enable remote search admin en Enable remote search
enter the path to the export file here addressbook en Enter the path to the exported file here
export contacts addressbook en Export Contacts
export file name addressbook en Export file name

View File

@ -2,7 +2,7 @@
<form method="POST" action="{action_url}">
<table border="0" align="center">
<tr bgcolor="{th_bg}">
<td colspan="2"><font color="{th_text}">&nbsp;<b>{title}</b></font></td>
<td colspan="2"><font color="{th_text}">&nbsp;<b>{title}</b></font></td>
</tr>
<tr bgcolor="{th_err}">
<td colspan="2">&nbsp;<b>{error}</b></font></td>
@ -44,6 +44,15 @@
<td>{lang_LDAP_root_pw_for_contacts}:</td>
<td><input name="newsettings[ldap_contact_pw]" type="password" value=""></td>
</tr>
<tr bgcolor="{row_on}">
<td>{lang_Enable_remote_search}:</td>
<td>
<select name="newsettings[enable_remote_addressbook]">
<option value="">{lang_no}</option>
<option value="True"{selected_enable_remote_addressbook_True}>{lang_yes}</option>
</select>
</td>
</tr>
<!-- END body -->
<!-- BEGIN footer -->
<tr bgcolor="{th_bg}">

View File

@ -1,6 +1,7 @@
<!-- BEGIN addressbook entry form -->
<table width="75%" border="0" align="center">
{search}
<tr bgcolor="{th_bg}">
<td colspan="5"><font color="{th_text}" face="">{lang_personal}:</font></td>
</tr>

View File

@ -1,8 +1,7 @@
<!-- BEGIN addressbook_header -->
<center>{lang_addressbook}
<br>{lang_showing}
<br>{searchreturn}
{search_filter}
<br>{searchreturn}{search_filter}{remotesearch}
<table width="75%" border="0" cellspacing="1" cellpadding="3">
<tr bgcolor="{th_bg}">{cols}
<td width="3%" height="21"><font face="Arial, Helvetica, sans-serif" size="-1">{lang_view}</font></td>
@ -25,6 +24,22 @@
</tr>
<!-- END row -->
<!-- BEGIN remsearch -->
<table width="75%" border="0" cellspacing="1" cellpadding="3">
<form method="POST" action="{remote_search}">
<tr bgcolor="{row_on}">
<td colspan="3">{lang_remote_search}:
<select name="serverid">
{search_remote}
</select>
</td>
<td><input size="30" name="remote_query" value="{remote_query}"></td>
<td><input type="submit" name="submit" value="{lang_go}"></td>
</tr>
</form>
</table>
<!-- END remsearch -->
<!-- BEGIN addressbook_footer -->
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="4">