/** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search($params) { $query = RatingProfile::find(); $dataProvider = new ActiveDataProvider(['query' => $query]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->andFilterWhere(['id' => $this->id, 'first_update' => $this->first_update, 'last_update' => $this->last_update]); $query->andFilterWhere(['like', 'desc', $this->desc])->andFilterWhere(['like', 'first_user', $this->first_user])->andFilterWhere(['like', 'first_ip', $this->first_ip])->andFilterWhere(['like', 'last_user', $this->last_user])->andFilterWhere(['like', 'last_ip', $this->last_ip]); return $dataProvider; }
?> <?php echo $form->field($model, 'virtual_id')->dropDownList(ArrayHelper::map(Virtual::find()->all(), 'id', 'name'), ['prompt' => 'Select Virutal']); ?> <?php echo $form->field($model, 'area_code')->textInput(); ?> <?php echo $form->field($model, 'office_code')->textInput(); ?> <?php echo $form->field($model, 'rating_id')->dropDownList(ArrayHelper::map(RatingProfile::find()->all(), 'id', 'desc'), ['prompt' => 'Select Rating']); ?> <?php echo $form->field($model, 'wallet')->textInput(['maxlength' => true]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?>