?> </td> </tr> <tr> <td><?php echo $form->label($model, 'date_respons'); ?> <?php echo $form->textField($model, 'date_respons'); ?> </td> <td><?php echo $form->label($model, 'respons_type'); ?> <?php echo $form->dropDownList($model, 'respons_type', CHtml::listData(Tipraspuns::model()->findAll(), 'id', 'name'), array('prompt' => 'Alegeti')); ?> </td> </tr> <tr><td colspan="2" style="text-align: right;"><?php echo CHtml::submitButton('Search', array('class' => 'btn')); ?> </td></tr> </tbody> </table>
/** * 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 = Tipraspuns::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }