?> <?php echo $form->error($model, 'slocid'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'serialno'); ?> <?php echo $form->textField($model, 'serialno', array('readonly' => true)); ?> <?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'serial_dialog', 'options' => array('title' => Yii::t('app', 'Material Detail'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true))); $productdetail = new Productdetail('searchwstatus'); $productdetail->unsetAttributes(); // clear any default values if (isset($_GET['Productdetail'])) { $productdetail->attributes = $_GET['Productdetail']; } $this->widget('zii.widgets.grid.CGridView', array('id' => 'productdetail-grid', 'dataProvider' => $productdetail->Searchwstatus(), 'filter' => $productdetail, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("+", array("name" => "send_absschedule", "id" => "send_absschedule", "onClick" => "$(\\"#serial_dialog\\").dialog(\\"close\\"); $(\\"#Gidetail_serialno\\").val(\\"$data->materialcode\\"); "))'), array('name' => 'productdetailid', 'visible' => false, 'value' => '$data->productdetailid:""'), 'materialcode', 'serialno'))); $this->endWidget('zii.widgets.jui.CJuiDialog'); echo CHtml::Button('...', array('onclick' => '$.fn.yiiGridView.update("productdetail-grid", { data: { "productid": $("#Gidetail_productid").val(), "slocid": $("#Gidetail_slocid").val()
/** * 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 = Productdetail::model()->findByPk((int) $id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }