public function init() { $this->fieldConfig = ['template' => "<div class=\"row\">\n <div class=\"col-xs-6\">{label}</div>\n <div class=\"col-xs-6\"> <span class=\"tooltip-field pull-right\"> {hint} </span> <span class=\"tooltip-error-field pull-right\"> {error} </span> </div>\n \n<div class=\"col-xs-12\">{input}</div>\n </div>"]; $this->fieldClass = ActiveField::className(); echo Html::tag('span', AmosIcons::show('alert'), ['id' => 'errore-alert-common', 'class' => 'errore-alert bk-noDisplay', 'title' => \Yii::t('app', 'La tab contiene degli errori')]); parent::init(); }
/** * @inheritdoc */ public function init() { if ($this->pjax) { $this->options['data-pjax'] = 1; } parent::init(); }
public function init() { $this->initForm(); if (empty($this->fieldConfig['options']) && $this->floatingLabel && $this->layout !== 'horizontal') { $this->fieldConfig['options'] = ['class' => 'form-group floating-label']; } parent::init(); }
public function init() { $this->setId(uniqid($this->getId())); if ($this->readOnly) { $this->fieldConfig['readOnly'] = true; } parent::init(); }
public function init() { ob_start(); ob_implicit_flush(false); parent::init(); ob_end_clean(); echo Html::beginTag('div', $this->options); }
public function init() { parent::init(); $controller = $this->getView()->context; $this->targetClass = $controller->id . '_' . $controller->action->id . '_' . $this->targetClass; echo Html::beginTag('div', ['class' => 'panel panel-info']); echo Html::tag('div', __('Search'), ['class' => 'panel-heading', 'data-target-class' => $this->targetClass]); echo Html::beginTag('div', ['class' => 'panel-body ' . $this->targetClass]); }
public function init() { $this->fieldConfig['horizontalCssClasses']['label'] = 'col-sm-' . $this->labelCols; $this->fieldConfig['horizontalCssClasses']['wrapper'] = 'col-sm-' . (self::COLS_TOTAL - $this->labelCols); parent::init(); $params = Yii::$app->request->queryParams; if (!empty($params['_return_url'])) { echo Html::hiddenInput('_return_url', $params['_return_url']); } }
public function init() { parent::init(); $controller = $this->getView()->context; $this->targetClass = $controller->id . '_' . $controller->action->id . '_' . $this->targetClass; echo Html::beginTag('div', ['class' => 'panel panel-info search-form']); echo Html::tag('div', __('Search'), ['class' => 'panel-heading app-toggle app-toggle-save pointer', 'data-target-class' => $this->targetClass]); $this->extraClass = empty($_COOKIE['app-toggle-' . $this->targetClass]) ? 'h ' : ''; echo Html::beginTag('div', ['class' => 'panel-body ' . $this->extraClass . $this->targetClass]); }
/** * @inheritdoc */ public function init() { parent::init(); // $id = $this->options['id']; $clientSideKey = Yii::$app->get('braintree')->clientSideKey; $view = $this->getView(); BraintreeAsset::register($view); // $view->registerJs("braintree.setup('$clientSideKey', 'custom', {id: '$id'});"); $view->registerJs("braintreeClient = new braintree.api.Client({clientToken: '{$clientSideKey}'});"); $this->fieldClass = ActiveField::className(); }
/** * Adds some default configuration. I.e. form name and layout class. * @inheritdoc */ public function init() { if (!in_array($this->layout, ['default', 'horizontal', 'inline'])) { throw new InvalidConfigException('Invalid layout type: ' . $this->layout); } if ($this->layout !== 'default') { Html::addCssClass($this->options, 'form-' . $this->layout); } if ($this->name) { $this->options['name'] = $this->name; } parent::init(); }
/** * @inheritdoc */ public function init() { parent::init(); $this->buttonGroupOptions = array_merge(['class' => 'btn-group'], $this->buttonGroupOptions); if ($this->displaySubmitButton) { if (!$this->submitButtonLabel) { $this->submitButtonLabel = Yii::t('app', 'Submit'); } $this->buttons[] = Html::submitButton($this->submitButtonLabel, $this->submitButtonOptions); } if ($this->displayResetButton) { if (!$this->resetButtonLabel) { $this->resetButtonLabel = Yii::t('app', 'Reset'); } $this->buttons[] = Html::resetButton($this->resetButtonLabel, $this->resetButtonOptions); } }
/** * @inheritdoc */ public function init() { parent::init(); BraintreeAsset::register($this->getView()); $this->fieldClass = ActiveField::className(); }
/** * in controller app\modules\main\controllers\ContactController * public function actionAjax($form) * { * case 'call'; * $model = new CallForm(); / your Model form * break; * } * in view * <?= Html::a('Оценка-ТЛ', ['/main/contact/ajax', 'form'=>'call'], ['class'=>'ajax-popup'])?> */ public function init() { ob_start(); parent::init(); }