* @var array
* @access private
*/
- var $_selectedCarita = null;
+ var $_selected = null;
- var $_numRows = 5;
+ var $_cols = 5;
/**
*/
function _setDefaults($options)
{
- /* if (isset($options['format'])) {
- $this->setFormat($options['format']);
+ if (isset($options['cols'])) {
+ $this->setCols($options['cols']);
}
- if (isset($options['language'])) {
+ /* if (isset($options['language'])) {
$this->setLanguage($options['language']);
}
if (isset($options['minYear'])) {
// }}}
// {{{ setName()
+ /**
+ * Sets the number of cols (columns)
+ * @param string $name Input field name attribute
+ * @access public
+ * @return void
+ */
+ function setCols($cols)
+ {
+ $this->_cols = $cols;
+ } //end func setCols
+
/**
* Sets the input field name
* @param string $name Input field name attribute
// }}}
// {{{ 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
// }}}
// {{{ _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()
/**
$strHtml = '';
$i = 1;
foreach ($this->radios as $nombre => $element) {
- if (@$this->_selectedCarita == $nombre) {
+ if (@$this->_selected == $nombre) {
$element->setChecked(true);
}
if ($this->_flagFrozen) {
}
$imagen =& new HTML_Image(MECON_DIR_IMG."/caritas/$nombre");
$strHtml .= ' ' . $imagen->toHtml() . ' ';
- if (!($i++ % $this->_numRows))
+ if (!($i++ % $this->_cols))
$strHtml .= '<br>';
}
return $strHtml;
}
}
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);