'htmlOptions' => array('prompt' => 'Seleccionar producto', 'id'=>'ncmnivel2' /*'multiple' => false,*/ ), ), 'hint' => 'Producto para añadir.' ) ); Yii::app()->clientScript->registerScript("cambioDivisa", '$(\'#divisa\').change(function(){$(\'#montoPresupuesto\').parent(\'span\').html(\'$\');})'); $importado .= $form->dropDownListGroup( $presuImp, 'divisa_id', array( 'wrapperHtmlOptions' => array( 'class' => 'col-sm-5', ), 'label'=>'Divisa', 'widgetOptions' => array( 'data' => CHtml::listData(Divisas::model()->findAll(),'divisa_id', function($divisa){ return CHtml::encode($divisa->nombre.' - '.$divisa->simbolo);}), //'options'=>array($model->proyecto_id => array('selected'=>true)), 'htmlOptions' => array('id'=>'divisa', 'prompt' => 'Seleccionar divisa', /*'multiple' => false,*/ ), ), 'hint' => 'Divisa a ser utiilzada en este producto.' ) ); $importado .= $form->dropDownListGroup( $presuImp, 'tipo', array( 'wrapperHtmlOptions' => array( 'class' => 'col-sm-5', ), 'label'=>'Tipo Importación', 'widgetOptions' => array(
/** * 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 = Divisas::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }