1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-24 07:03:06 +02:00

admin UI - consistent arguments of 'options' override methods

This commit is contained in:
secretr
2012-05-02 14:24:19 +00:00
parent b8ade88540
commit 5c973fb66f
2 changed files with 7 additions and 6 deletions

View File

@@ -608,7 +608,7 @@ class e_form
foreach ($elements as $value => $label)
{
$label = defset($label, $label);
$text[] = $this->radio($name, $value, $checked == $value)."".$this->label($label, $name, $value).(isset($help[$value]) ? "<div class='field-help'>".$help[$value]."</div>" : '');
$text[] = $this->radio($name, $value, (string) $checked === (string) $value)."".$this->label($label, $name, $value).(isset($help[$value]) ? "<div class='field-help'>".$help[$value]."</div>" : '');
}
if(!$multi_line)
return implode("&nbsp;&nbsp;", $text);
@@ -1316,13 +1316,14 @@ class e_form
if(isset($attributes['method']) && $attributes['method'] && method_exists($this, $attributes['method']))
{
$method = $attributes['method'];
return $this->$method($parms, $value, $id);
return $this->$method($parms, $value, $id, $attributes);
}
elseif(method_exists($this, 'options'))
{
return $this->options($field, $value, $attributes, $id);
// return $this->options($parms, $value, $id); // breaks admin->cron 'options' column
//return $this->options($field, $value, $attributes, $id);
// consistent method arguments, fixed in admin cron administration
return $this->options($parms, $value, $id, $attributes); // OLD breaks admin->cron 'options' column
}
}