/** * Prepare the input fields for the input * * @return void */ protected function prepareInput() { if ($this->hasModel()) { $this->sections['input'] = Html::activeTextInput($this->model, $this->attribute, $this->options); } else { $this->sections['input'] = Html::textInput($this->name, $this->value, $this->options); } }
/** * Prepare the input fields for the input * * @return void */ protected function prepareInput() { if ($this->hasModel()) { if (!isset($this->options['value']) && $this->model->{$this->attribute} == '0000-00-00') { $this->options['value'] = ''; } $this->sections['input'] = Html::activeTextInput($this->model, $this->attribute, $this->options); } else { $this->sections['input'] = Html::textInput($this->name, $this->value == '0000-00-00' ? '' : $this->value, $this->options); } }
/** * Prepare the input fields for the input * * @return void */ protected function prepareInput() { if ($this->asComponent) { $this->addAddon(['content' => '<i></i>', 'options' => ['class' => 'color-component']], 'append', true); $this->setGroupOption('id', $this->options['id'] . '-wrap'); $this->pluginOptions['component'] = '.color-component'; } if ($this->hasModel()) { $this->sections['input'] = Html::activeTextInput($this->model, $this->attribute, $this->options); } else { $this->sections['input'] = Html::textInput($this->name, $this->value, $this->options); } }