mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-03 13:25:05 +01:00
reverting r36788 as it breaks editing of custom fields, type is not returned because of added post_process method is also called for customfields-type widget
This commit is contained in:
parent
e100d0ce5f
commit
ebb3a2595f
@ -26,7 +26,6 @@ class customfields_widget
|
|||||||
{
|
{
|
||||||
var $public_functions = array(
|
var $public_functions = array(
|
||||||
'pre_process' => True,
|
'pre_process' => True,
|
||||||
'post_process' => True,
|
|
||||||
);
|
);
|
||||||
var $human_name = array(
|
var $human_name = array(
|
||||||
'customfields' => 'custom fields',
|
'customfields' => 'custom fields',
|
||||||
@ -113,16 +112,10 @@ class customfields_widget
|
|||||||
function pre_process($form_name,&$value,&$cell,&$readonlys,&$extension_data,etemplate $tmpl)
|
function pre_process($form_name,&$value,&$cell,&$readonlys,&$extension_data,etemplate $tmpl)
|
||||||
{
|
{
|
||||||
list($app) = explode('.',$tmpl->name);
|
list($app) = explode('.',$tmpl->name);
|
||||||
if($extension_data['app']) $app = $extension_data['app'];
|
|
||||||
// if we are in the etemplate editor or the app has no cf's, load the cf's from the app the tpl belongs too
|
// if we are in the etemplate editor or the app has no cf's, load the cf's from the app the tpl belongs too
|
||||||
if ($app && $app != 'stylite' && $app != $this->appname && (
|
if ($app && $app != 'stylite' && $app != $this->appname && ($this->appname == 'etemplate' || !$this->customfields || etemplate::$hooked))
|
||||||
$this->appname == 'etemplate' || !$this->customfields || etemplate::$hooked || $extension_data['app']
|
|
||||||
))
|
|
||||||
{
|
{
|
||||||
self::__construct(null,$app); // app changed
|
self::__construct(null,$app); // app changed
|
||||||
|
|
||||||
// Need to keep hooked app for things like nm filter changes and validation errors
|
|
||||||
if(etemplate::$hooked) $extension_data['app'] = $app;
|
|
||||||
}
|
}
|
||||||
list($type2,$use_private,$field_names) = explode(',',$cell['size'],3);
|
list($type2,$use_private,$field_names) = explode(',',$cell['size'],3);
|
||||||
$fields_with_vals=array();
|
$fields_with_vals=array();
|
||||||
@ -500,12 +493,6 @@ class customfields_widget
|
|||||||
return True; // extra Label is ok
|
return True; // extra Label is ok
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Override to pass along extension_data - doesn't happen otherwise
|
|
||||||
*/
|
|
||||||
public function post_process($name,&$value,&$extension_data,&$loop,etemplate &$tmpl,$value_in) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the options of a 'select' or 'radio' custom field from a file
|
* Read the options of a 'select' or 'radio' custom field from a file
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user