fixed not working type specific customfields in infolog

This commit is contained in:
Ralf Becker 2007-07-12 07:30:20 +00:00
parent a7cecfe600
commit 7e577e22c4
3 changed files with 7 additions and 5 deletions

View File

@ -71,6 +71,8 @@
function pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
{
$type2 = $cell['size'];
switch($type = $cell['type'])
{
case 'customfields-types':
@ -85,7 +87,7 @@
case 'customfields-list':
foreach(array_reverse($this->customfields) as $name => $field)
{
if (!empty($field['type2']) && strpos(','.$field['type2'].',',','.$value.',') === false) continue; // not for our content type
if (!empty($field['type2']) && strpos(','.$field['type2'].',',','.$type2.',') === false) continue; // not for our content type
if (isset($value[$this->prefix.$name]) && $value[$this->prefix.$name] !== '') break;
$stop_at_field = $name;
}
@ -109,7 +111,7 @@
if ($stop_at_field && $name == $stop_at_field) break; // no further row necessary
// check if the customfield get's displayed for type $value, we can have multiple comma-separated types now
if (!empty($field['type2']) && strpos(','.$field['type2'].',',','.$value.',') === false)
if (!empty($field['type2']) && strpos(','.$field['type2'].',',','.$type2.',') === false)
{
continue; // not for our content type
}

View File

@ -2,7 +2,7 @@
/**
* eGroupWare - eTemplates for Application infolog
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2007-07-11 17:20
* generated by soetemplate::dump4setup() 2007-07-12 09:43
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package infolog
@ -40,7 +40,7 @@ $templ_data[] = array('name' => 'infolog.edit','template' => '','lang' => '','gr
$templ_data[] = array('name' => 'infolog.edit.customfields','template' => '','lang' => '','group' => '0','version' => '1.0.0.001','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:12:"customfields";s:4:"name";s:12:"customfields";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:15:"100%,100%,,,0,0";}}','size' => '100%,100%,,,0,0','style' => '','modified' => '1061732462',);
$templ_data[] = array('name' => 'infolog.edit.customfields','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:2:"th";s:2:"h2";s:4:"100%";s:2:"h1";s:2:"20";}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Custom fields";}}i:2;a:1:{s:1:"A";a:1:{s:4:"type";s:12:"customfields";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:25:"100%,245,,row_on,0,0,auto";s:7:"options";a:6:{i:3;s:6:"row_on";i:0;s:4:"100%";i:1;s:3:"245";i:6;s:4:"auto";i:4;s:1:"0";i:5;s:1:"0";}}}','size' => '100%,245,,row_on,0,0,auto','style' => '','modified' => '1061732462',);
$templ_data[] = array('name' => 'infolog.edit.customfields','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:2:"th";s:2:"h2";s:4:"100%";s:2:"h1";s:2:"20";}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Custom fields";}}i:2;a:1:{s:1:"A";a:2:{s:4:"type";s:12:"customfields";s:4:"size";s:10:"@info_type";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:25:"100%,245,,row_on,0,0,auto";s:7:"options";a:6:{i:3;s:6:"row_on";i:0;s:4:"100%";i:1;s:3:"245";i:6;s:4:"auto";i:4;s:1:"0";i:5;s:1:"0";}}}','size' => '100%,245,,row_on,0,0,auto','style' => '','modified' => '1061732462',);
$templ_data[] = array('name' => 'infolog.edit.delegation','template' => '','lang' => '','group' => '0','version' => '1.2.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:8:{s:1:"A";s:3:"100";s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:2:"c4";s:2:"th";s:2:"c5";s:7:"row,top";s:2:"c6";s:3:"row";s:2:"h6";s:2:",1";s:2:"c3";s:3:"row";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:7:"General";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:8:"Priority";s:4:"size";s:16:",,,info_priority";}s:1:"B";a:3:{s:4:"type";s:6:"select";s:4:"name";s:13:"info_priority";s:4:"help";s:31:"select a priority for this task";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:16:",,,info_location";s:5:"label";s:8:"Location";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"name";s:13:"info_location";s:4:"size";s:6:"80,255";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:10:"Delegation";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:11:"Responsible";s:4:"size";s:19:",,,info_responsible";}s:1:"B";a:4:{s:4:"type";s:14:"select-account";s:4:"size";s:2:"10";s:4:"name";s:16:"info_responsible";s:4:"help";s:66:"select a responsible user: a person you want to delegate this task";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Confirm";s:4:"size";s:15:",,,info_confirm";}s:1:"B";a:3:{s:4:"type";s:6:"select";s:4:"name";s:12:"info_confirm";s:4:"help";s:87:"do you want a confirmation of the responsible on: accepting, finishing the task or both";}}}s:4:"rows";i:6;s:4:"cols";i:2;s:4:"size";s:8:"100%,245";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"245";}}}','size' => '100%,245','style' => '','modified' => '1075972977',);

View File

@ -121,7 +121,7 @@
<description value="Custom fields"/>
</row>
<row height="100%">
<customfields/>
<customfields options="@info_type"/>
</row>
</rows>
</grid>