<?php echo $form->textFieldGroup($model,'costo_unitario',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>38)))); ?> </td> <td> <?php echo $form->textFieldGroup($model,'cantidad_adquirida',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5')))); ?> </td> <td> <?php echo $form->select2Group($model, 'unidad_id', array( 'wrapperHtmlOptions' => array( 'class' => 'col-sm-5', ), 'label'=>'Unidad', 'widgetOptions' => array( 'asDropDownList' => true, 'data' => CHtml::listData(Unidades::model()->findAll(),'unidad_id', 'nombre'), 'htmlOptions'=>array('id'=>'unidad',), 'options' => array( //'tags' => array('clever', 'is', 'better', 'clevertech'), 'placeholder' => 'Seleccionar unidad', // 'width' => '40%', 'tokenSeparators' => array(',', ' ') ) ) ) ); ?> </td> <td> <?php //echo $form->textFieldGroup($model,'iva_id',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5'))));
/** * 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 = Unidades::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }