Ejemplo n.º 1
0
 /**
  * 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 $id the ID of the model to be loaded
  * @return PortfolioTypes the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = PortfolioTypes::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Ejemplo n.º 2
0
?>
	</div>
 </div>
</div>

	<div class="row">
	<div class="form-group">
     <div class="span2">
		<?php 
echo $form->labelEx($model, 'type_id');
?>
        </div>
        <div class="col-sm-8 clearLeftPadding">
		<?php 
//echo $form->textField($model,'type_id');
echo $form->dropDownList($model, 'type_id', CHtml::listData(PortfolioTypes::model()->findAll(array('select' => 'id, portfolio_type', 'order' => 'portfolio_type')), 'id', 'portfolio_type'), array('empty' => '- Select -'));
?>
		<?php 
echo $form->error($model, 'type_id');
?>
	</div>
    </div>
 </div>


    
    <div class="clearfix"></div>
<br />    
 <br />