$criteria = new CDbCriteria;
$course_names =CHtml::listData(NasfiaWorkTypes::model()->findAll($criteria),'id','name');
$course_list = CMap::mergeArray(array(0=>Yii::t('app','Select Work Type')),$course_names);
$course=$_GET['id'];
echo CHtml::dropDownList('course','',$course_list,array(
'ajax' => array(
'type'=>'POST',
'url'=>CController::createUrl('/hr/staff/SetAttendance'),
'update'=>'#id',
'data'=>'js:{name:$(this).val(), "'.Yii::app()->request->csrfTokenName.'":"'.Yii::app()->request->csrfToken.'"}',),'style'=>'width:150px;','options' => array($course=>array('selected'=>true),)));
?></td>