Кто вы:
- = $form->field ($user, 'type')
- ->label (false)
- ->radioList (
- [1 => 'Частное лицо', 2 => 'Компания'],
- [
- 'item' => function($index, $label, $name, $checked, $value) {
- $return = '
';
- $return .= '';
- $return .= '';
- $return .= '
';
- return $return;
- }
- ]
- );
- ?>
+ = $form->field($user, 'type')
+ ->label(false)
+ ->radioList([
+ 1 => 'Частное лицо',
+ 2 => 'Компания',
+ ], [
+ 'item' => function($index, $label, $name, $checked, $value) {
+ $return = '
';
+ $return .= '';
+ $return .= '';
+ $return .= '
';
+ return $return;
+ },
+ ]); ?>
Контакты представителя:
@@ -96,111 +97,111 @@
- =
- $form->field($user_info, 'city')->widget(Select2::classname(), [
- 'options' => ['placeholder' => 'Выбор города ...'],
- 'pluginOptions' => [
- 'allowClear' => true,
- 'minimumInputLength' => 3,
- 'ajax' => [
- 'url' => \yii\helpers\Url::to(['site/city']),
- 'dataType' => 'json',
- 'data' => new JsExpression('function(params) { return {q:params.term}; }')
- ],
- 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
- 'templateResult' => new JsExpression('function(city) { return city.text; }'),
- 'templateSelection' => new JsExpression('function (city) { return city.text; }'),
- ],
- ]);
- ?>
+ = $form->field($user_info, 'city')
+ ->widget(Select2::classname(), [
+ 'options' => [ 'placeholder' => 'Выбор города ...' ],
+ 'pluginOptions' => [
+ 'allowClear' => true,
+ 'minimumInputLength' => 3,
+ 'ajax' => [
+ 'url' => \yii\helpers\Url::to([ 'site/city' ]),
+ 'dataType' => 'json',
+ 'data' => new JsExpression('function(params) { return {q:params.term}; }'),
+ ],
+ 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
+ 'templateResult' => new JsExpression('function(city) { return city.text; }'),
+ 'templateSelection' => new JsExpression('function (city) { return city.text; }'),
+ ],
+ ]); ?>
- = $form->field ($company_info, 'street', ['options' => ['class' => 'form-group company_info']])
- ->textInput (['class'=> 'custom-input-2']);
- ?>
+ = $form->field($company_info, 'street', [ 'options' => [ 'class' => 'form-group company_info' ] ])
+ ->textInput([ 'class' => 'custom-input-2' ]); ?>
- = $form->field ($company_info, 'house', ['options' => ['class' => 'form-group company_info']])
- ->textInput (['class'=> 'custom-input-2']);
- ?>
+ = $form->field($company_info, 'house', [ 'options' => [ 'class' => 'form-group company_info' ] ])
+ ->textInput([ 'class' => 'custom-input-2' ]); ?>