예제 #1
0
 /**
  * Register the form builder instance.
  *
  * @return void
  */
 protected function registerFormBuilder()
 {
     $this->app->bindShared('form', function ($app) {
         $form = new FormBuilder($app['html'], $app['url'], $app['session.store']->getToken(), $app['view']);
         return $form->setSessionStore($app['session.store']);
     });
 }
예제 #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);
    }
예제 #3
0
 public function select($name, $list = [], $selected = null, $options = [], $label = null)
 {
     // Set up the attributes
     $options = $this->verifyAttributes('select', $options);
     // Create the default input
     $input = parent::select($name, $list, $selected, $options);
     return $this->createOutput($name, $label, $input);
 }
 public function select($name, $list = [], $selected = null, $options = [], $label = null)
 {
     $this->setSelectRequirements();
     // Create the default input
     $input = parent::select($name, $list, $selected, $options);
     return $this->createOutput($name, $label, $input);
 }