$contractor_type_input_id, ]); ?> andWhere(['id' => $model->$attribute])->all(); echo $form->field($model, $attribute) ->label($labels['contractor_name']) ->widget(Select2::class, [ 'language' => Yii::$app->language, 'data' => ArrayHelper::map($item_selected, 'id', 'fullname'), 'options' => [ 'placeholder' => Yii::t( 'common/widgets/contractor-field', 'Подпись пустого значения выпадающего списка для поля "contractor_id" блока "Контрагент": `Выберите организацию ...`' ), 'id' => $config['selectInputId'], 'data' => $config['data'] ?? [], ], 'readonly' => $is_readonly, 'disabled' => $disabled, 'pluginOptions' => [ 'allowClear' => false, 'multiple' => false, 'ajax' => [ 'url' => Url::to(['/contractor/search']), 'method' => 'post', 'delay' => '500', 'dataType' => 'json', 'data' => new JsExpression("function(params) { var type = $('#" . $contractor_type_input_id . "').val(); return { q:params.term, contractor_type:type, page: params.page || 1 }; }") ], 'dropdownParent' => "#{$wrapper_id}" ] ]); ?>
$config['notFoundCheckboxInputId'], 'class' => 'select-widget-not-found', 'readonly' => $is_readonly, 'disabled' => $disabled, 'data-block-id-found' => $blockIdFound, 'data-block-id-not-found' => $blockIdNotFound, ]); ?>
$config['approveModalId'], 'class' => 'approve-modal-btn' ]); ?>
render('_approveModal', [ 'model' => $model, 'attribute' => $attribute, 'contractor' => $item_selected[0] ?? new Contractor(), 'config' => $config, 'contractor_type_input_id' => $contractor_type_input_id, 'keynum' => $keynum, 'contractor_type_ref_uid' => $contractor_type_ref_uid, 'mask_subdivision_code' => $mask_subdivision_code, 'found_block_id' => $blockIdFound, ]); ?>