setCSSClass('search'); } public function generate() { $id = $this->getID(); $name = $this->getName(); $css = $this->getCSSClass(); $size = $this->getParam('size', 0); $maxsize = $this->getParam('maxsize', 40); $value = $this->getValue(); $js_import = array(); $js_submit = ''; $html = 'getInlineCSS()) $html .= 'style="' . $this->getInlineCSS() . '" '; if($size > 0) $html .= 'size="' . $size . '" '; if($maxsize > 0) $html .= 'maxlength="' . $maxsize . '" '; if($value !== false) $html .= 'value="' . self::escapeString((string) $value) . '" '; if($this->isRequired()) { $html .= ' onblur="validate(\'' . self::escapeString($id) . '\',\'^.+$\',\'' . $css . '\',\'' . $css . '_error\',true);" '; $js_import[] = 'jscript/form/validate.js'; $js_submit .= ''; } $html .= '/>'; return array('html' => $html,'js_import' => $js_import,'js_submit' => $js_submit); } } ?>