Esempio n. 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = TblProfesiones::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]);
     $query->andFilterWhere(['like', 'profesion', $this->profesion]);
     return $dataProvider;
 }
Esempio n. 2
0
echo $form->field($model, 'nit')->Input("number", ['maxlength' => true, 'min' => 666666]);
?>
</div>
                    </div>
                    <div class="row">
                        
                        
                    </div>
                   <?php 
//$form->field($model, 'id_profesion')->dropDownList(
//                                   ArrayHelper::map(TblProfesiones::find()->all(), 'id', 'profesion')
//                                 )//->textInput()
?>
                    <div class="input-group input-group-sm">
                        <?php 
echo $form->field($model, 'id_profesion')->dropDownList(ArrayHelper::map(TblProfesiones::find()->all(), 'id', 'profesion'), ["class" => "form-control", 'ng-model' => 'profesion']);
?>
                        
                        <span class="input-group-btn" style="float:right;top:55px;right:0px;position:absolute" >
                          <button type="button"  ui-sref="state1" data-backdrop="static" 
                          data-keyboard="false" data-toggle="modal" data-target="#myModal" 
                          style="position: absolute;bottom: 0px;" class="btn btn-info btn-flat">+</button>
                        </span>
                  </div>
                    <?php 
if ($model->isNewRecord) {
    echo $this->render('../site/signup', ['model' => $modelu, 'form' => $form]);
}
?>
                    <br>