From ecdfd1590d4eaa300c7e3ee694e2de23c06364de Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 2 Jan 2009 01:23:41 +0000 Subject: fix line endings --- core/libraries/MY_Form_Radio.php | 122 +++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 61 deletions(-) (limited to 'core') diff --git a/core/libraries/MY_Form_Radio.php b/core/libraries/MY_Form_Radio.php index 27283f1f..d2aec1a6 100644 --- a/core/libraries/MY_Form_Radio.php +++ b/core/libraries/MY_Form_Radio.php @@ -1,61 +1,61 @@ - '', - '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 + '', + '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