mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Implement sub_app attribute for customfields widget, in order to be able to store sub-app's specific customfields
This commit is contained in:
parent
9746e1533e
commit
11c03702dd
@ -127,7 +127,7 @@ class admin_customfields
|
||||
{
|
||||
// determine appname
|
||||
$this->appname = $this->appname ? $this->appname : ($_GET['appname'] ? $_GET['appname'] : ($content['appname'] ? $content['appname'] : false));
|
||||
if(!$this->appname) die(lang('Error! No appname found'));
|
||||
if(!$this->appname || !Api\Link::get_registry($this->appname, 'title')) die(lang('Error! No appname found'));
|
||||
|
||||
$this->use_private = !isset($_GET['use_private']) || (boolean)$_GET['use_private'] || $content['use_private'];
|
||||
|
||||
|
@ -48,6 +48,11 @@ var et2_customfields_list = (function(){ "use strict"; return et2_valueWidget.ex
|
||||
'private': {
|
||||
ignore: true,
|
||||
type: 'boolean'
|
||||
},
|
||||
'sub_app': {
|
||||
'name': 'sub app name',
|
||||
'type': "string",
|
||||
'description': "Name of sub application"
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -126,6 +126,7 @@ class Customfields extends Transformer
|
||||
if(!$app)
|
||||
{
|
||||
$app =& $this->setElementAttribute(self::GLOBAL_VALS, 'app', $GLOBALS['egw_info']['flags']['currentapp']);
|
||||
if ($this->attrs['sub-app']) $app .= '-'.$this->attrs['sub-app'];
|
||||
$customfields =& $this->setElementAttribute(self::GLOBAL_VALS, 'customfields', Api\Storage\Customfields::get($app));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user