]> git.llucax.com Git - mecon/meconlib.git/commitdiff
Se limpia un poco y se agregan metodos para seleccionar y obtener el valor seleccionado.
authorMartín Marrese <marrese@gmail.com>
Tue, 29 Jul 2003 20:50:07 +0000 (20:50 +0000)
committerMartín Marrese <marrese@gmail.com>
Tue, 29 Jul 2003 20:50:07 +0000 (20:50 +0000)
lib/MECON/HTML/QuickForm/caritas.php

index 9979b21b2db5627b94753c1bdad655e36521f296..aa8bcbb7b9ca50c00c8353fae53fed74873edff8 100644 (file)
@@ -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);