function render() { if (isset($GLOBALS['xoTheme'])) { $GLOBALS['xoTheme']->addScript('include/color-picker.js'); } else { echo "<script type=\"text/javascript\" src=\"" . XOOPS_URL . "/include/color-picker.js\"></script>"; } $this->setExtra(' style="background-color:' . $this->getValue() . ';"'); return parent::render() . "\n<input type='reset' value=' ... ' onclick=\"return TCP.popup('" . XOOPS_URL . "/include/',document.getElementById('" . $this->getName() . "'));\">\n"; }
/** * Constructor * @param object $object reference to targetobject (@link IcmsPersistableObject) * @param string $key the form name */ function __construct($object, $key) { $var = $object->vars[$key]; if (isset($object->controls[$key])) { $control = $object->controls[$key]; $form_maxlength = isset($control['maxlength']) ? $control['maxlength'] : (isset($var['maxlength']) ? $var['maxlength'] : 255); $form_size = isset($control['size']) ? $control['size'] : 50; } else { $form_maxlength = 255; $form_size = 50; } parent::__construct($var['title'], $key, $form_size, $form_maxlength, $object->getVar($key, 'e')); }
/** * Constructor * @param object $object reference to targetobject (@link IcmsPersistableObject) * @param string $key the form name */ function __construct($caption, $name, $include_file, $size, $maxlength, $value = "") { $this->_include_file = $include_file; parent::__construct($caption, $name, $size, $maxlength, $value); }
function __construct($caption, $name, $size = 15, $value = 0) { $value = !is_numeric($value) ? time() : intval($value); parent::__construct($caption, $name, $size, 25, $value); }