Exemplo n.º 1
0
?>

<?php 
echo $form->textFieldRow($model, 'dias_ausencia');
?>

<?php 
echo $form->textFieldRow($model, 'horas_ausencia');
?>

<?php 
echo $form->textAreaRow($model, 'descripcion', array('rows' => 3, 'cols' => 50));
?>

<?php 
echo $form->dropDownListRow($model, 'permiso_asunto_id', array('' => ' -- Seleccione -- ') + CHtml::listData(PermisoAsunto::model()->findAll(), 'id', PermisoAsunto::representingColumn()));
?>

<?php 
echo $form->dropDownListRow($model, 'empleado_id', array('' => ' -- Seleccione -- ') + CHtml::listData(Empleado::model()->findAll(), 'id', Empleado::representingColumn()));
?>

<?php 
echo $form->dropDownListRow($model, 'permismo_etapa_id', array('' => ' -- Seleccione -- ') + CHtml::listData(PermismoEtapa::model()->findAll(), 'id', PermismoEtapa::representingColumn()));
?>

<div class="form-actions">
    <?php 
$this->widget('bootstrap.widgets.TbButton', array('type' => 'primary', 'label' => Yii::t('AweCrud.app', 'Search')));
?>
</div>
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id, $modelClass = __CLASS__)
 {
     $model = PermisoAsunto::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }