[ 'class' => 'search-work-form' ],
'action' => [ '' ],
'method' => 'get',
]);
?>
= $form->field($model, '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($model, 'specialization')
->dropDownList($specialization, [ 'prompt' => 'Любая' ]); ?>
= $form->field($model, 'type')
->dropDownList([
'1' => 'Частное лицо',
'2' => 'Компания',
], [ 'prompt' => 'Любой' ]); ?>
=
$form->field($model, 'working_conditions')
->checkboxList([
'guarantee' => 'С гарантией',
//'contract' => 'С договором',
//'estimate' => 'Со сметой',
'prepayment' => 'Без предоплаты',
], [
'item' => function($index, $label, $name, $checked, $value) {
$return = '
';
$return .= '';
$return .= '';
$return .= '
';
return $return;
},
]); ?>
field($model, 'rating', [
'template' => "{label}
{$model->rating}
{input}\n{hint}\n{error}",
'labelOptions' => [
'class' => 'blocks-check-title',
],
])
->widget(SliderInput::className(), [
'clientOptions' => [
'min' => 0,
'max' => 5,
'step' => 0.5,
],
'clientEvents' => [
'slide' => "function( event, ui ) {
$( '#{$form->id}-rating' ).text(ui.value);
$('input[name=\"{$model->formName()}[rating]\"]').val(ui.value);
}",
],
]);
?>
= $form->field($model, 'online', [
'options' => [
'class' => 'blocks-check-list-wrapp',
],
'template' => "
{label}
\n{input}\n{hint}\n{error}",
])
->radioList([
'' => 'Все',
1 => 'Онлайн',
], [
'item' => function($index, $label, $name, $checked, $value) use ($model) {
return "
";
},
'unselect' => NULL,
]); ?>
= $form->field($model, 'additional_parameters')
->checkboxList([
'with_portfolio' => 'Только с портфолио',
'with_comments' => 'Только с отзывами',
'only_free' => 'Только свободные',
], [
'item' => function($index, $label, $name, $checked, $value) {
$return = '
';
$return .= '';
$return .= '';
$return .= '
';
return $return;
},
]); ?>
= Html::submitInput('Найти') ?>
end();
?>