*/
class Varien_Data_Form_Element_Time extends Varien_Data_Form_Element_Abstract
{
public function __construct($attributes=array())
{
parent::__construct($attributes);
$this->setType('time');
}
public function getName()
{
$name = parent::getName();
if (strpos($name, '[]') === false) {
$name.= '[]';
}
return $name;
}
public function getElementHtml()
{
$this->addClass('select');
$value_hrs = 0;
$value_min = 0;
$value_sec = 0;
if( $value = $this->getValue() ) {
$values = explode(',', $value);
if( is_array($values) && count($values) == 3 ) {
$value_hrs = $values[0];
$value_min = $values[1];
$value_sec = $values[2];
}
}
$html = '';
$html .= ''."\n";
$html.= ' : '."\n";
$html.= ' : '."\n";
$html.= $this->getAfterElementHtml();
return $html;
}
}