/**
  * 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)
 {
     $model = Employeestatus::model()->findByPk((int) $id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
?>
          <?php 
echo $form->error($model, 'joindate');
?>
        </div>
	  </td>
	   <td>
        <div class="row">
          <?php 
echo $form->labelEx($model, 'employeestatusid');
?>
          <?php 
echo $form->hiddenField($model, 'employeestatusid');
?>
          <input type="text" name="employeestatus_name" id="employeestatus_name" style="width:75%" readonly value="<?php 
echo Employeestatus::model()->findByPk($model->employeestatusid) !== null ? Employeestatus::model()->findByPk($model->employeestatusid)->employeestatusname : '';
?>
">
          <?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'employeestatus_dialog', 'options' => array('title' => Yii::t('app', 'Employee Status'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true)));
$employeestatus = new Employeestatus('searchwfstatus');
$employeestatus->unsetAttributes();
// clear any default values
if (isset($_GET['Employeestatus'])) {
    $employeestatus->attributes = $_GET['Employeestatus'];
}
$this->widget('zii.widgets.grid.CGridView', array('id' => 'employeestatus-grid', 'dataProvider' => $employeestatus->Searchwstatus(), 'filter' => $employeestatus, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("V",
                array("name" => "send_employeestatus",
                "id" => "send_employeestatus",
                "onClick" => "$(\\"#employeestatus_dialog\\").dialog(\\"close\\"); $(\\"#employeestatus_name\\").val(\\"$data->employeestatusname\\"); $(\\"#Employee_employeestatusid\\").val(\\"$data->employeestatusid\\");"))'), array('name' => 'employeestatusid', 'visible' => false, 'value' => '$data->employeestatusid', 'htmlOptions' => array('width' => '1%')), 'employeestatusname')));
$this->endWidget('zii.widgets.jui.CJuiDialog');