Example #1
0
?>
			<?php 
echo $form->dropDownList($model, 'producto_presentacion_id', CHtml::listData(ProductoPresentacion::model()->findAll("id > 0 order by 'presentacion'"), 'id', 'presentacion'), array('class' => 'input-large'));
?>
			<?php 
echo $form->error($model, 'producto_presentacion_id');
?>
		</div>
		<div class="span1"></div>

		<div class="span3">
			<?php 
echo $form->labelEx($model, 'producto_unidad_medida_id');
?>
			<?php 
echo $form->dropDownList($model, 'producto_unidad_medida_id', CHtml::listData(ProductoUnidadMedida::model()->findAll("id > 0 order by 'medida'"), 'id', 'medida'), array('class' => 'input-large'));
?>
			<?php 
echo $form->error($model, 'producto_unidad_medida_id');
?>
		</div>
		<div class="span1"></div>
		<div class="span2">
			<?php 
echo $form->labelEx($model, 'stock_minimo');
?>
			<?php 
echo $form->textField($model, 'stock_minimo', array('class' => 'input-mini'));
?>
			<?php 
echo $form->error($model, 'stock_minimo');
 /**
  * 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 ProductoUnidadMedida the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = ProductoUnidadMedida::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }