예제 #1
0
 public function text($name, $value = null, $options = [], $label = null)
 {
     // Set up the attributes
     $options = $this->verifyAttributes('text', $options);
     // Create the default input
     $input = parent::text($name, $value, $options);
     return $this->createOutput($name, $label, $input);
 }
예제 #2
0
    public function color($name, $value, $options = [], $label = null)
    {
        // Set up the attributes
        $options = $this->verifyAttributes('color', $options);
        $this->setColorRequirements();
        // Create the default input
        $input = parent::text($name, $value, $options);
        $input = <<<HTML
        <div class="input-group">
            <span class="input-group-addon" id="colorPreview{$name}" style="background-color: {$value};">&nbsp;</span>
            {$input}
        </div>
HTML;
        return $this->createOutput($name, $label, $input);
    }