<?php

class attr_color_picker extends attr {
    public function getDBType() {
        return "varchar(7)";
    }


    public function render_input() {
        if ($this->obj->attrs[$this->attr_name]['mand']) {
            $required = ' required = "required" ';
        } else {
            $required = '';
        }
        return '<input id="' . $this->attr_name . '" ' . $required . ' type="color" name="' . $this->attr_name . '" value="' .$this->getCurVal() . '">';
    }


}

?>