diff --git a/etemplate/inc/class.contact_widget.inc.php b/etemplate/inc/class.contact_widget.inc.php
index e2e669cd41..2e28b7edb9 100644
--- a/etemplate/inc/class.contact_widget.inc.php
+++ b/etemplate/inc/class.contact_widget.inc.php
@@ -80,7 +80,7 @@ class contact_widget
function pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
{
//echo "
contact_widget::pre_process('$name','$value',".print_r($cell,true).",...)
\n";
- switch($cell['type'])
+ switch($type = $cell['type'])
{
case 'contact-fields':
$GLOBALS['egw']->translation->add_app('addressbook');
@@ -158,6 +158,8 @@ class contact_widget
}
break;
}
+ $cell['id'] = ($cell['id'] ? $cell['id'] : $cell['name'])."[$type]";
+
return True; // extra label ok
}
}
diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php
index 89e5b2eaf2..fc8df5393b 100644
--- a/etemplate/inc/class.uietemplate.inc.php
+++ b/etemplate/inc/class.uietemplate.inc.php
@@ -615,8 +615,8 @@ foreach($sess as $key => $val)
}
// make the content availible as class-var for extensions
$this->content =& $content;
-
- $html = "\n\n\n\n";
+
+ $html = "\n\n\nname\">\n\n";
if (!$GLOBALS['egw_info']['etemplate']['styles_included'][$this->name])
{
$GLOBALS['egw_info']['etemplate']['styles_included'][$this->name] = True;
@@ -631,7 +631,7 @@ foreach($sess as $key => $val)
$child['align'],
),'class,align')) : $h;
}
- return $html."\n\n";
+ return $html."\n
\n\n\n";
}
/**
@@ -1118,7 +1118,7 @@ foreach($sess as $key => $val)
if ($value != '' && $style && strpos($style,'b')!==false) $value = $this->html->bold($value);
if ($value != '' && $style && strpos($style,'i')!==false) $value = $this->html->italic($value);
// if the label has a name, use it as id in a span, to allow addressing it via javascript
- $html .= ($name ? '' : '').$value.($name ? '' : '');
+ $html .= ($name ? '' : '').$value.($name ? '' : '');
if ($help)
{
$class = array(
@@ -1860,6 +1860,13 @@ foreach($sess as $key => $val)
$str = lang($matches[1]);
$on = str_replace($matches[0],'\''.addslashes($str).'\'',$on);
}
+
+ // inserts the styles of a named template
+ if (preg_match('/template::styles\(["\']{1}(.*)["\']{1}\)/U',$on,$matches))
+ {
+ $tpl = $matches[1] == $this->name ? $this : new etemplate($matches[1]);
+ $on = str_replace($matches[0],"''",$on);
+ }
}
if (strpos($on,'confirm(') !== false && preg_match('/confirm\(["\']{1}(.*)["\']{1}\)/',$on,$matches)) {
$question = lang($matches[1]).(substr($matches[1],-1) != '?' ? '?' : ''); // add ? if not there, saves extra phrase
diff --git a/infolog/inc/class.infolog_widget.inc.php b/infolog/inc/class.infolog_widget.inc.php
index c0ac4f6888..4cbb44f7ab 100644
--- a/infolog/inc/class.infolog_widget.inc.php
+++ b/infolog/inc/class.infolog_widget.inc.php
@@ -200,6 +200,8 @@ class infolog_widget
}
break;
}
+ $cell['id'] = ($cell['id'] ? $cell['id'] : $cell['name'])."[$type]";
+
return True; // extra label ok
}