18 require_once SQ_INCLUDE_PATH.
'/asset_attribute.inc';
52 $this->_params = Array(
'allow_blanks' =>
false);
66 function paint($prefix, $read_only=
false)
70 <span style=
"background-color: <?php echo $this->value; ?>;"> </span>
72 echo strtoupper($this->value);
76 require_once SQ_LIB_PATH.
'/html_form/html_form.inc';
77 colour_box($prefix, $this->value);
91 if (!isset($_REQUEST[$prefix]))
return false;
92 $value = $_REQUEST[$prefix];
93 if ($this->value != $value && $this->
setValue($value)) {
94 $this->processed =
true;
96 $this->processed =
false;
112 $value = trim($value);
114 if (preg_match(
'/^#?[0-9a-f]{6}$/i', (
string) $value)) {
115 if ($value{0} !=
'#') $value =
'#'.$value;
117 }
else if (!empty($this->_params[
'allow_blanks']) && strlen($value) == 0) {