process js_pseudo_funcs in onchange of date-widget

This commit is contained in:
Ralf Becker 2012-03-18 14:40:49 +00:00
parent 2cef8aaa1d
commit 819c806460

View File

@ -280,7 +280,10 @@ class date_widget
{
$dcell['type'] = 'html';
$dcell['name'] = 'str';
$jscaloptions = $cell['onchange'] ? ( ' onchange="'. ( (int)$cell['onchange'] === 1 ? 'this.form.submit();"' : $cell['onchange']. '"' ) ) : '' ;
$cname_parts = array_splice(explode('[',str_replace(']','',$name)), 0, -count(explode('[',str_replace(']','',$cell['name']))));
$cname = array_shift($cname_parts);
if ($cname_parts) $cname .= '['.implode('][', $cname_parts).']';
$jscaloptions = $cell['onchange'] ? ( ' onchange="'. ( (int)$cell['onchange'] === 1 ? 'this.form.submit();"' : $tmpl->js_pseudo_funcs($cell['onchange'],$cname). '"' ) ) : '' ;
$value['str'] = $this->jscal->input($name.'[str]',False,$value['Y'],$value['m'],$value['d'],lang($cell['help']),$jscaloptions,false,!($options & 128));
$n = 2; // no other fields
$options &= ~2; // no set-today button