/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $parentmatgroup = new Materialgroup('searchwstatus'); $parentmatgroup->unsetAttributes(); // clear any default values if (isset($_GET['Parentmatgroup'])) { $parentmatgroup->attributes = $_GET['Parentmatgroup']; } $materialtype = new Materialtype('searchwstatus'); $materialtype->unsetAttributes(); // clear any default values if (isset($_GET['Materialtype'])) { $materialtype->attributes = $_GET['Materialtype']; } $model = new Materialgroup('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Materialgroup'])) { $model->attributes = $_GET['Materialgroup']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'parentmatgroup' => $parentmatgroup, 'materialtype' => $materialtype)); }
<?php echo $form->error($model, 'addresstypeid'); ?> </div> </td> <td> <div class="row"> <?php echo $form->labelEx($model, 'materialgroupid'); echo $form->hiddenField($model, 'materialgroupid'); ?> <input type="text" name="materialgroupcode" id="materialgroupcode" readonly > <?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'materialgroup_dialog', 'options' => array('title' => Yii::t('app', 'Material Group'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true))); $materialgroup = new Materialgroup('searchwstatus'); $materialgroup->unsetAttributes(); // clear any default values if (isset($_GET['Materialgroup'])) { $materialgroup->attributes = $_GET['Materialgroup']; } $this->widget('zii.widgets.grid.CGridView', array('id' => 'materialgroup-grid', 'dataProvider' => $materialgroup->Searchwstatus(), 'filter' => $materialgroup, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("V", array("name" => "send_addresstype", "id" => "send_addresstype", "onClick" => "$(\\"#materialgroup_dialog\\").dialog(\\"close\\"); $(\\"#materialgroupcode\\").val(\\"$data->materialgroupcode\\"); $(\\"#Productbasic_materialgroupid\\").val(\\"$data->materialgroupid\\");"))'), array('name' => 'materialgroupid', 'visible' => false, 'value' => '$data->materialgroupid', 'htmlOptions' => array('width' => '1%')), 'materialgroupcode'))); $this->endWidget('zii.widgets.jui.CJuiDialog'); echo CHtml::Button('...', array('onclick' => '$("#materialgroup_dialog").dialog("open"); return false;')); ?> <?php echo $form->error($model, 'materialgroupid');
echo $form->error($model, 'description'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'parentmatgroupid'); ?> <?php echo $form->hiddenField($model, 'parentmatgroupid'); ?> <input type="text" name="parentmatgroupcode" id="parentmatgroupcode" readonly > <?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'absschedule_dialog', 'options' => array('title' => Yii::t('app', 'Material Group'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true))); $parentmatgroup = new Materialgroup('searchwstatus'); $parentmatgroup->unsetAttributes(); // clear any default values if (isset($_GET['Parentmatgroup'])) { $parentmatgroup->attributes = $_GET['Parentmatgroup']; } $this->widget('zii.widgets.grid.CGridView', array('id' => 'absschedule-grid', 'dataProvider' => $parentmatgroup->Searchwstatus(), 'filter' => $parentmatgroup, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("+", array("name" => "send_absschedule", "id" => "send_absschedule", "onClick" => "$(\\"#absschedule_dialog\\").dialog(\\"close\\"); $(\\"#parentmatgroupcode\\").val(\\"$data->materialgroupcode\\"); $(\\"#Materialgroup_parentmatgroupid\\").val(\\"$data->materialgroupid\\"); "))'), 'materialgroupid', 'materialgroupcode', 'description'))); $this->endWidget('zii.widgets.jui.CJuiDialog'); echo CHtml::Button('...', array('onclick' => '$.fn.yiiGridView.update("absschedule-grid");$("#absschedule_dialog").dialog("open"); return false;')); ?> <?php echo $form->error($model, 'parentmatgroupid'); ?>