"removed onclick alert"

This commit is contained in:
Ralf Becker 2009-07-18 15:39:00 +00:00
parent 326a31722b
commit a874ad53a4

View File

@ -166,7 +166,7 @@ class customfields_widget
$n = 1;
foreach($fields as $lname => $field)
{
if (!(array_search($lname,$fields_with_vals)===false))
if (array_search($lname,$fields_with_vals) !== false)
{
if ($stop_at_field && $lname == $stop_at_field) break; // no further row necessary
@ -184,16 +184,18 @@ class customfields_widget
'no_lang' => substr(lang($field['label']),-1) == '*' ? 2 : 0,
'span' => $field['type'] === 'label' ? '2' : '',
)));
} elseif ($type == 'customfields-list') {
if (isset($value[$this->prefix.$lname]) && $value[$this->prefix.$lname] !== '') {
}
elseif ($type == 'customfields-list')
{
if (isset($value[$this->prefix.$lname]) && $value[$this->prefix.$lname] !== '')
{
switch ((string)$field['type'])
{
case 'checkbox':
if ($value[$this->prefix.$lname]==0) break;
default:
etemplate::add_child($cell,$input =& etemplate::empty_cell('image','info.png',
array('label'=>/*lang("custom fields").": ".*/$field['label'],'width'=>"16px",
'onclick'=>"return alert('".lang("custom fields").": ".$field['label']."');")));
array('label'=> $field['label'],'width'=>"16px")));
}
}
}
@ -242,10 +244,13 @@ class customfields_widget
$field['values'] = $this->_get_options_from_file($field['values']['@']);
}
if($this->advanced_search && $field['rows'] <= 1) $field['values'][''] = lang('doesn\'t matter');
if ($readonly) {
if ($readonly)
{
$showthis = $value[$this->prefix.$lname];
$input =& etemplate::empty_cell('hbox');
} else {
}
else
{
$input =& etemplate::empty_cell('groupbox');
}
$m = 0;
@ -291,13 +296,10 @@ class customfields_widget
}
$input =& etemplate::empty_cell('textarea',$this->prefix.$lname,$tmparray);
}
} else {
$input =& etemplate::empty_cell('label',$this->prefix.$lname,
array(
'onclick'=>"return alert('".lang("custom fields").": ".
$lname."=>".htmlentities(str_replace("\r","",str_replace("\n"," ",$value[$this->prefix.$lname]))) ."');",
)
);
}
else
{
$input =& etemplate::empty_cell('label',$this->prefix.$lname);
}
break;
case 'date':