From: Martín Marrese Date: Tue, 29 Jul 2003 20:50:07 +0000 (+0000) Subject: Se limpia un poco y se agregan metodos para seleccionar y obtener el valor seleccionado. X-Git-Tag: svn_import~346 X-Git-Url: https://git.llucax.com/mecon/meconlib.git/commitdiff_plain/ab276d0f5ae833dd3b9dc8d3a2c92877277984ec?ds=inline Se limpia un poco y se agregan metodos para seleccionar y obtener el valor seleccionado. --- diff --git a/lib/MECON/HTML/QuickForm/caritas.php b/lib/MECON/HTML/QuickForm/caritas.php index 9979b21..aa8bcbb 100644 --- a/lib/MECON/HTML/QuickForm/caritas.php +++ b/lib/MECON/HTML/QuickForm/caritas.php @@ -45,7 +45,7 @@ class HTML_QuickForm_caritas extends HTML_QuickForm_element * @var array * @access private */ - var $_selectedCarita = null; + var $_selected = null; var $_numRows = 5; @@ -150,6 +150,46 @@ class HTML_QuickForm_caritas extends HTML_QuickForm_element // }}} // {{{ getName() + /** + * Sets the element value + * @access public + * @return string + */ + function setValue($value) + { + $this->_selected = $value; + } //end func getName + + /** + * Sets the element value + * @access public + * @return string + */ + function setSelected($value) + { + $this->_selected = $value; + } //end func getName + + /** + * Returns the element value + * @access public + * @return string + */ + function getValue() + { + return $this->_selected; + } //end func getName + + /** + * Returns the element value + * @access public + * @return string + */ + function getSelected() + { + return $this->_selected; + } //end func getName + /** * Returns the element name * @access public @@ -184,21 +224,6 @@ class HTML_QuickForm_caritas extends HTML_QuickForm_element // }}} // {{{ _createNumericOptionList() - // {{{ setSelectedCarita() - - /** - * Sets the selected carita - * @param mixed an associative array corresponding to the format you chose - * for your date or an unix epoch timestamp - * @access public - * @return void - */ - function setSelectedCarita($value) - { - $this->_selectedCarita = $value; - } // end func setSelectedDate - - // }}} // {{{ toHtml() /** @@ -213,7 +238,7 @@ class HTML_QuickForm_caritas extends HTML_QuickForm_element $strHtml = ''; $i = 1; foreach ($this->radios as $nombre => $element) { - if (@$this->_selectedCarita == $nombre) { + if (@$this->_selected == $nombre) { $element->setChecked(true); } if ($this->_flagFrozen) { @@ -265,11 +290,11 @@ class HTML_QuickForm_caritas extends HTML_QuickForm_element } } if (null !== $value) { - $this->setSelectedCarita($value); + $this->setSelected($value); } break; case 'setGroupValue': - $this->setSelectedCarita($arg); + $this->setSelected($arg); break; default: parent::onQuickFormEvent($event, $arg, $caller);