1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

form handler - id option for checkbox_toggle method

This commit is contained in:
secretr
2010-05-11 10:47:48 +00:00
parent ff84e0f73c
commit 252100989e

View File

@@ -405,10 +405,11 @@ class e_form
return $this->checkbox($name, $value, $checked).$this->label($label ? $label : LAN_ENABLED, $name, $value); return $this->checkbox($name, $value, $checked).$this->label($label ? $label : LAN_ENABLED, $name, $value);
} }
function checkbox_toggle($name, $selector = 'multitoggle') function checkbox_toggle($name, $selector = 'multitoggle', $id = false)
{ {
$selector = 'jstarget:'.$selector; $selector = 'jstarget:'.$selector;
return $this->checkbox($name, $selector, false, array('id'=>false,'class'=>'checkbox toggle-all')); if($id) $id = $this->name2id($id);
return $this->checkbox($name, $selector, false, array('id' => $id,'class' => 'checkbox toggle-all'));
} }
function uc_checkbox($name, $current_value, $uc_options, $field_options = array()) function uc_checkbox($name, $current_value, $uc_options, $field_options = array())