Exemplo n.º 1
0
ZHtml::multiEndedDropDown($model, $form, 'instructor_id', "CHtml::listData(Instructor::model()->findAll(), 'id', 'full_name')", 'CHtml::encode($model->instructor->full_name)');
?>
	<?php 
echo $form->error($model, 'instructor_id');
?>

	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'requirement_type_id');
?>


    <?php 
echo $form->dropDownList($model, 'requirement_type_id', CHtml::listData(RequirementType::model()->findAll(), 'id', 'description'));
?>
		<?php 
echo $form->error($model, 'requirement_type_id');
?>
	</div>


	<div class="row">
		<?php 
echo $form->labelEx($model, 'received');
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'received', 'value' => $model->received, 'options' => array('showAnim' => 'fold', 'showButtonPanel' => true, 'autoSize' => true, 'changeYear' => true, 'dateFormat' => 'yy-mm-dd', 'defaultDate' => $model->received)));
?>
		<?php 
echo $form->error($model, 'received');
?>
 /**
  * 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.
  */
 public function loadModel()
 {
     if ($this->_model === null) {
         if (isset($_GET['id'])) {
             $this->_model = RequirementType::model()->findbyPk($_GET['id']);
         }
         if ($this->_model === null) {
             throw new CHttpException(404, 'The requested page does not exist.');
         }
     }
     return $this->_model;
 }