"onClick" => "$(\\"#city_dialog\\").dialog(\\"close\\"); $(\\"#city_name\\").val(\\"$data->cityname\\"); $(\\"#Bankaddress_cityid\\").val(\\"$data->cityid\\");"))'), 'cityid', 'cityname', array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus')))); $this->endWidget('zii.widgets.jui.CJuiDialog'); echo CHtml::Button('...', array('onclick' => '$("#city_dialog").dialog("open"); return false;')); ?> <?php echo $form->error($model, 'cityid'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'kelurahanid'); echo $form->hiddenField($model, 'kelurahanid'); ?> <input type="text" name="kelurahan_name" id="kelurahan_name" readonly value="<?php echo Kelurahan::model()->findByPk($model->kelurahanid) !== null ? Kelurahan::model()->findByPk($model->kelurahanid)->kelurahanname : ''; ?> "> <?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'kelurahan_dialog', 'options' => array('title' => Yii::t('app', 'Sub Subdistrict'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true))); $kelurahan = new Kelurahan('searchwstatus'); $kelurahan->unsetAttributes(); // clear any default values if (isset($_GET['Kelurahan'])) { $kelurahan->attributes = $_GET['Kelurahan']; } $this->widget('zii.widgets.grid.CGridView', array('id' => 'kelurahan-grid', 'dataProvider' => $kelurahan->Searchwstatus(), 'filter' => $kelurahan, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("+", array("name" => "send_kelurahan", "id" => "send_kelurahan", "onClick" => "$(\\"#kelurahan_dialog\\").dialog(\\"close\\"); $(\\"#kelurahan_name\\").val(\\"$data->kelurahanname\\"); $(\\"#Bankaddress_kelurahanid\\").val(\\"$data->kelurahanid\\");"))'), 'kelurahanid', 'kelurahanname', array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus')))); $this->endWidget('zii.widgets.jui.CJuiDialog');
/** * 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 = Kelurahan::model()->findByPk((int) $id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }