예제 #1
0
파일: _form.php 프로젝트: sacuriom/alba2
?>

    <?php 
echo $form->field($perfil, 'nombre')->textInput(['maxlength' => 30]);
?>

    <?php 
echo $form->field($perfil, 'tipo_documento_id')->dropDownList(ArrayHelper::map(TipoDocumento::find()->orderBy('id ASC')->asArray()->all(), 'id', 'abreviatura'));
?>

    <?php 
echo $form->field($perfil, 'numero_documento')->textInput(['maxlength' => 30]);
?>

    <?php 
echo $form->field($perfil, 'estado_documento_id')->dropDownList(ArrayHelper::map(EstadoDocumento::find()->orderBy('id ASC')->asArray()->all(), 'id', 'descripcion'), ['prompt' => '']);
?>
    
    <?php 
echo $form->field($perfil, 'sexo_id')->dropDownList(ArrayHelper::map(Sexo::find()->orderBy('id ASC')->asArray()->all(), 'id', 'descripcion'), ['prompt' => '']);
?>

    <?php 
echo $form->field($perfil, 'fecha_nacimiento')->widget(DatePicker::className(), ['options' => ['class' => 'form-control'], 'clientOptions' => ['changeYear' => true, 'changeMonth' => true]]);
?>

    <?php 
echo $form->field($perfil, 'lugar_nacimiento')->textInput(['maxlength' => 255]);
?>

    <?php 
예제 #2
0
파일: Perfil.php 프로젝트: sacuriom/alba2
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEstadoDocumento()
 {
     return $this->hasOne(EstadoDocumento::className(), ['id' => 'estado_documento_id']);
 }