Пример #1
0
          <?php 
echo $form->hiddenField($model, 'religionid');
?>
          <input type="text" name="religion_name" id="religion_name" style="width:75%" readonly value="<?php 
echo Religion::model()->findByPk($model->religionid) !== null ? Religion::model()->findByPk($model->religionid)->religionname : '';
?>
">
          <?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'religion_dialog', 'options' => array('title' => Yii::t('app', 'Religion'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true)));
$religion = new Religion('searchwstatus');
$religion->unsetAttributes();
// clear any default values
if (isset($_GET['Religion'])) {
    $religion->attributes = $_GET['Religion'];
}
$this->widget('zii.widgets.grid.CGridView', array('id' => 'religion-grid', 'dataProvider' => $religion->Searchwstatus(), 'filter' => $religion, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("V",
                array("name" => "send_religion",
                "id" => "send_religion",
                "onClick" => "$(\\"#religion_dialog\\").dialog(\\"close\\"); $(\\"#religion_name\\").val(\\"$data->religionname\\"); $(\\"#Employee_religionid\\").val(\\"$data->religionid\\");"))'), array('name' => 'religionid', 'visible' => false, 'value' => '$data->religionid', 'htmlOptions' => array('width' => '1%')), 'religionname')));
$this->endWidget('zii.widgets.jui.CJuiDialog');
echo CHtml::Button('...', array('onclick' => '$("#religion_dialog").dialog("open"); return false;'));
?>
          <?php 
echo $form->error($model, 'religionid');
?>
        </div>
      </td>
	  <td>
        <div class="row">
          <?php 
echo $form->labelEx($model, 'maritalstatusid');