From 46b976819db700343289dc5f40dea3ac4f482458 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 11 Jan 2009 21:36:24 +0000 Subject: Deleted unused MY_Form_Radio --- core/libraries/MY_Form_Radio.php | 61 ---------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 core/libraries/MY_Form_Radio.php (limited to 'core') diff --git a/core/libraries/MY_Form_Radio.php b/core/libraries/MY_Form_Radio.php deleted file mode 100644 index d2aec1a6..00000000 --- a/core/libraries/MY_Form_Radio.php +++ /dev/null @@ -1,61 +0,0 @@ - '', - 'class' => 'radio', - 'type'=>'radio', - 'options'=>array() - ); - protected $protect = array('type'); - - public function __get($key) { - if ($key == 'value') { - return $this->selected; - } - return parent::__get($key); - } - - public function html_element() { - // Import base data - $data = $this->data; - // Get the options and default selection - $options = arr::remove('options', $data); - $selected = arr::remove('selected', $data); - // martin hack - unset($data['label']); - $html =''; - foreach($options as $option=>$labelText){ - $html .= form::radio(array ('name' => $data['name'], 'id' => $data['name'] . "_" . $option ), - $option, $this->value? $this->value==$option: $data['default']==$option). - form::label($data['name']."_".$option , $labelText)." "; - } - return $html; - } - - protected function load_value() { - if (is_bool($this->valid)) - return; - $this->data['selected'] = $this->input_value($this->name); - } -} // End Form radio -- cgit v1.2.3