Hi,
Has anyone experienced that strange behavior when using an ajaxlink to open a CJuidialog with an activForm and no controls are accessible ?
In Main view we’ve got
<div id="dialogAssign" style="display:none;"></div> // the container for the dialog
//now the ajaxLink
<?php echo CHtml::ajaxLink('Assign a course to this student',$this->createUrl('/student_courses/createDialog?frm=student&cid='.$model->id),array('onclick'=>'$("#dialogAssign").dialog("open");return false;','update'=>'#dialogAssign'),array('id'=>'showDialogAssign')); ?>
And this is how lloks the view createDialog
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog',array(
'id'=>'createDialog',
'options'=>array(
'title'=>Yii::t('student_courses','Assign a new course'),
'autoOpen'=>true,
'modal'=>true,
'show'=>'scale',
'hide'=>'puff',
'width'=>'400',
'height'=>'400',
'buttons'=>array(
'Cancel'=>'js: function() {$(this).dialog(\'close\');}',),
),
));
echo $this->renderPartial('_formDialog', array('model'=>$model));
?>
<?php $this->endWidget('zii.widgets.jui.CJuiDialog');?>
And there goes the form
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'student-courses-form',
'enableAjaxValidation'=>true,
));
<p class="note">Fields with <span class="required">*</span> are required.</p>
<?php echo $form->errorSummary($model); ?>
<div class="row">
<?php echo $form->labelEx($model,'remarks'); ?>
<?php echo $form->textArea($model,'remarks',array('rows'=>6, 'cols'=>50)); ?>
<?php echo $form->error($model,'remarks'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model,'certification_date'); ?>
<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
'name'=>'students[certification_date]',
'id'=>'student_coursecertification_date',
'model'=>$model,
'value'=>$model->getAttribute('certification_date'),
// additional javascript options for the date picker plugin
'options'=>array(
'showAnim'=>'fold','altFormat'=>'yyyy-mm-dd','dateFormat'=>'yy-mm-dd',
),
'htmlOptions'=>array(
'style'=>'height:20px;'
),
)); ?>
<?php echo $form->error($model,'certification_date'); ?>
</div>
<br/>
<div class="row buttons">
<?php echo CHtml::ajaxSubmitButton($model->isNewRecord ? 'Create' : 'Save',array('type'=>'POST','update'=>'#StatusBar',)); ?>
</div>
<?php $this->endWidget(); ?>
</div><!-- form -->
Everything seems fine except that the form in completely inaccessible and I can only close the dialog through the right-top corner cross. Firebug is silent after the dialog has opened…no trace on the console.
I’ve spent several days in trying to solve this but something is clearly missing me.
Regards,
xav