mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 19:03:14 +01:00
Advanced search: Turn off required on custom fields, otherwise you can't search with them empty
This commit is contained in:
parent
59fc41a5b9
commit
a1f2802387
@ -2892,6 +2892,7 @@ window.egw_LAB.wait(function() {
|
||||
|
||||
// initialize etemplate arrays
|
||||
$sel_options = $readonlys = array();
|
||||
$this->tmpl->read('addressbook.edit');
|
||||
$content = Api\Cache::getSession('addressbook', 'advanced_search');
|
||||
$content['n_fn'] = $this->fullname($content);
|
||||
// Avoid ID conflict with tree & selectboxes
|
||||
@ -2924,6 +2925,8 @@ window.egw_LAB.wait(function() {
|
||||
if (!isset($content['#'.$name])) $content['#'.$name] = '';
|
||||
if(!isset($data['values'][''])) $sel_options['#'.$name][''] = lang('Select one');
|
||||
}
|
||||
// Make them not required, otherwise you can't search
|
||||
$this->tmpl->setElementAttribute('#'.$name, 'needed', FALSE);
|
||||
}
|
||||
}
|
||||
// configure edit template as search dialog
|
||||
@ -2946,7 +2949,6 @@ window.egw_LAB.wait(function() {
|
||||
|
||||
if ($this->config['private_cf_tab']) $content['no_private_cfs'] = 0;
|
||||
|
||||
$this->tmpl->read('addressbook.edit');
|
||||
$this->tmpl->set_cell_attribute('change_org','disabled',true);
|
||||
return $this->tmpl->exec('addressbook.addressbook_ui.search',$content,$sel_options,$readonlys,array(),2);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user