*/ class Varien_Data_Form_Element_Multiline extends Varien_Data_Form_Element_Abstract { public function __construct($attributes=array()) { parent::__construct($attributes); $this->setType('text'); $this->setLineCount(2); } public function getHtmlAttributes() { return array('type', 'title', 'class', 'style', 'onclick', 'onchange', 'disabled', 'maxlength'); } public function getLabelHtml($suffix = 0) { return parent::getLabelHtml($suffix); } /** * Get element HTML * * @return string */ public function getElementHtml() { $html = ''; $lineCount = $this->getLineCount(); for ($i = 0; $i < $lineCount; $i++) { if ($i == 0 && $this->getRequired()) { $this->setClass('input-text required-entry'); } else { $this->setClass('input-text'); } $html .= '
serialize($this->getHtmlAttributes()) . ' />' . "\n"; if ($i==0) { $html .= $this->getAfterElementHtml(); } $html .= '
'; } return $html; } public function getDefaultHtml() { $html = ''; $lineCount = $this->getLineCount(); for ($i=0; $i<$lineCount; $i++){ $html.= ( $this->getNoSpan() === true ) ? '' : ''."\n"; if ($i==0) { $html.= ''."\n"; if($this->getRequired()){ $this->setClass('input-text required-entry'); } } else { $this->setClass('input-text'); $html.= ''."\n"; } $html.= 'serialize($this->getHtmlAttributes()).' />'."\n"; if ($i==0) { $html.= $this->getAfterElementHtml(); } $html.= ( $this->getNoSpan() === true ) ? '' : ''."\n"; } return $html; } }