20 defined(
'XOOPS_ROOT_PATH') or die('Restricted access');
43 $this->XoopsFormText($caption, $name, 9, 7, $value);
54 $GLOBALS[
'xoTheme']->addScript(
'include/color-picker.js');
56 echo
'<script type="text/javascript" src="' . XOOPS_URL .
'/include/color-picker.js"></script>';
58 $this->setExtra(
' style="background-color:' . $this->getValue() .
';"');
59 return parent::render() .
"<input type='reset' value=' ... ' onclick=\"return TCP.popup('" . XOOPS_URL .
"/include/',document.getElementById('" . $this->getName() .
"'));\">" ;
67 function renderValidationJS()
69 $eltname = $this->getName();
70 $eltcaption = $this->getCaption();
73 return "if ( !(new RegExp(\"^#[0-9a-fA-F]{6}\",\"i\").test(myform.{$eltname}.value)) ) { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }";