mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
Nextmatch-customfilter doesn't need its own file, move it in with the others
This commit is contained in:
parent
79a6e9f2d3
commit
a48c990607
@ -799,6 +799,12 @@ class etemplate_widget_nextmatch extends etemplate_widget
|
||||
// Registration needs to go here, otherwise customfields won't be loaded until some other cf shows up
|
||||
etemplate_widget::registerWidget('etemplate_widget_customfields', array('nextmatch-customfields'));
|
||||
|
||||
/**
|
||||
* Extend selectbox so select options get parsed properly before being sent to client
|
||||
*/
|
||||
class etemplate_widget_nextmatch_filterheader extends etemplate_widget_menupopup
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend selectbox and change type so proper users / groups get loaded, according to preferences
|
||||
@ -812,3 +818,27 @@ class etemplate_widget_nextmatch_accountfilter extends etemplate_widget_menupopu
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A filter widget that fakes another (select) widget and turns it into a nextmatch filter widget.
|
||||
*/
|
||||
class etemplate_widget_nextmatch_customfilter extends etemplate_widget_transformer
|
||||
{
|
||||
|
||||
protected $legacy_options = 'type,options';
|
||||
|
||||
/**
|
||||
* Fill type options in self::$request->sel_options to be used on the client
|
||||
*
|
||||
* @param string $cname
|
||||
*/
|
||||
public function beforeSendToClient($cname)
|
||||
{
|
||||
self::$transformation['type'] = $this->attrs['type'];
|
||||
$form_name = self::form_name($cname, $this->id, $expand);
|
||||
$this->setElementAttribute($form_name, 'options', $this->attrs['options']);
|
||||
|
||||
parent::beforeSendToClient($cname);
|
||||
$this->setElementAttribute($form_name, 'type', 'nextmatch-filterheader');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* EGroupware - eTemplate custom filter widget
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package etemplate
|
||||
* @subpackage api
|
||||
* @link http://www.egroupware.org
|
||||
* @author Nathan Gray
|
||||
* @copyright 2011 Nathan Gray
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* A filter widget that fakes another widget and turns it into a nextmatch filter widget.
|
||||
* It's best to not use this, but instead make the appropriate filter widget
|
||||
*
|
||||
*/
|
||||
class etemplate_widget_nextmatch_customfilter extends etemplate_widget_transformer
|
||||
{
|
||||
|
||||
protected $legacy_options = 'type,options';
|
||||
|
||||
/**
|
||||
* Fill type options in self::$request->sel_options to be used on the client
|
||||
*
|
||||
* @param string $cname
|
||||
*/
|
||||
public function beforeSendToClient($cname)
|
||||
{
|
||||
self::$transformation['type'] = $this->attrs['type'];
|
||||
$form_name = self::form_name($cname, $this->id, $expand);
|
||||
$this->setElementAttribute($form_name, 'options', $this->attrs['options']);
|
||||
|
||||
return parent::beforeSendToClient($cname);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user