Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- how to pass the view id to the CJuiDialog box?
- <?php
- $this->widget('zii.widgets.grid.CGridView',array(
- 'dataProvider'=>$dataProvider,
- 'columns' => array(
- array(
- 'name' => 'emailaddress',
- 'htmlOptions' => array(
- 'width' => '30',
- ),
- ),
- array(
- 'name' => 'secretkey',
- 'htmlOptions' => array(
- 'width' => '40px',
- ),
- ),
- array(
- 'header' => 'Options',
- 'class' => 'CButtonColumn',
- 'template' => '{view}{update}{delete}',
- ),
- array(
- 'header' => 'Copy URLs',
- 'class' => 'CButtonColumn',
- 'template' => '{copy}',
- 'buttons' => array(
- 'copy' => array(
- 'label' => 'copy url',
- 'url' => 'Yii::app()->createUrl("emails/view",array("id"=>$data["emailid"]))',
- 'options' => array('id' => $data["emailid"]),
- 'click' => 'function(){$("#mydialog").dialog("open"); return false;}',
- )
- ),
- ),
- ),
- ));
- ?>
- <?php
- $this->beginWidget('zii.widgets.jui.CJuiDialog', array(
- 'id' => 'mydialog',
- 'options' => array(
- 'title' => 'URL + Key',
- 'autoOpen' => false,
- 'width' => 500,
- 'height' => 300,
- ),
- ));
- //THIS PART SHOULD RECEIVE THE ID SO THAT I CAN QUERY TO THE DB TABLE
- ?>
- <?php
- $this->endWidget('zii.widgets.jui.CJuiDialog');
- ?>
- SELECT u.url,e.secretKey FROM tbl_emails AS e, tbl_urls AS u
- WHERE emailid = ID;
Add Comment
Please, Sign In to add comment