echo CHtml::ajaxLink(Yii::t('manufacturer', TbHtml::button('+', array('color' => TbHtml::BUTTON_COLOR_SUCCESS, 'size' => TbHtml::BUTTON_SIZE_DEFAULT))), $this->createUrl('manufacturer/addnew'), array('onclick' => '$("#divDialog4").dialog("open"); return false;', 'update' => '#divDialog4'), array('id' => uniqid())); ?> <div id="divDialog4"></div> </div> </div> </div> </tr> <tr> <div class="row"> <div class="col-md-3 col-sm-6"> <div class="span2"><?php echo $form->labelEx($model, 'consumable_type_id', array('class' => 'inline-labels')); ?> </div> <div class="span3"><?php echo $form->dropDownList($model, 'consumable_type_id', CHtml::listData(Consumabletype::model()->findAll(), 'id', 'name'), array('span' => 2, 'prompt' => '---')); ?> <?php echo CHtml::ajaxLink(Yii::t('consumabletype', TbHtml::button('+', array('color' => TbHtml::BUTTON_COLOR_SUCCESS, 'size' => TbHtml::BUTTON_SIZE_DEFAULT))), $this->createUrl('consumabletype/addnew'), array('onclick' => '$("#divDialog1").dialog("open"); return false;', 'update' => '#divDialog1'), array('id' => uniqid())); ?> <div id="divDialog1"></div> </div> <div class="span2"><?php echo $form->labelEx($model, 'management_type_id', array('class' => 'inline-labels')); ?> </div> <div class="span3"><?php echo $form->dropDownList($model, 'management_type_id', CHtml::listData(Managementtype::model()->findAll(), 'id', 'name'), array('span' => 2, 'prompt' => '---')); ?> <?php echo CHtml::ajaxLink(Yii::t('managementtype', TbHtml::button('+', array('color' => TbHtml::BUTTON_COLOR_SUCCESS, 'size' => TbHtml::BUTTON_SIZE_DEFAULT))), $this->createUrl('managementtype/addnew'), array('onclick' => '$("#divDialog5").dialog("open"); return false;', 'update' => '#divDialog5'), array('id' => uniqid()));
echo CHtml::ajaxLink(Yii::t('manufacturer', TbHtml::button('+', array('color' => TbHtml::BUTTON_COLOR_SUCCESS, 'size' => TbHtml::BUTTON_SIZE_DEFAULT))), $this->createUrl('manufacturer/addnew'), array('onclick' => '$("#divDialog4").dialog("open"); return false;', 'update' => '#divDialog4'), array('id' => uniqid())); ?> <div id="divDialog4"></div> </div> </div> </div> </tr> <tr> <div class="row"> <div class="col-md-3 col-sm-6"> <div class="span2"><?php echo $form->labelEx($model, 'printer_type_id', array('class' => 'inline-labels')); ?> </div> <div class="span3"><?php echo $form->dropDownList($model, 'printer_type_id', CHtml::listData(Consumabletype::model()->findAllByAttributes(array('commodity_id' => $value)), 'id', 'name'), array('span' => 2, 'prompt' => '---')); ?> <?php echo CHtml::ajaxLink(Yii::t('consumabletype', TbHtml::button('+', array('color' => TbHtml::BUTTON_COLOR_SUCCESS, 'size' => TbHtml::BUTTON_SIZE_DEFAULT))), $this->createUrl('consumabletype/addnew'), array('onclick' => '$("#divDialog1").dialog("open"); return false;', 'update' => '#divDialog1'), array('id' => uniqid())); ?> <div id="divDialog1"></div> </div> <div class="span2"><?php echo $form->labelEx($model, 'management_type_id', array('class' => 'inline-labels')); ?> </div> <div class="span3"><?php echo $form->dropDownList($model, 'management_type_id', CHtml::listData(Managementtype::model()->findAll(), 'id', 'name'), array('span' => 2, 'prompt' => '---')); ?> <?php echo CHtml::ajaxLink(Yii::t('managementtype', TbHtml::button('+', array('color' => TbHtml::BUTTON_COLOR_SUCCESS, 'size' => TbHtml::BUTTON_SIZE_DEFAULT))), $this->createUrl('managementtype/addnew'), array('onclick' => '$("#divDialog5").dialog("open"); return false;', 'update' => '#divDialog5'), array('id' => uniqid()));
/** * 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 Consumabletype the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Consumabletype::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }