Preview: questionanswerbodybulk.php
                Size: 4.63 KB
              
              
                
              
            
            /home/jambtst2015/public_html/protected/views/webadmin/questionanswerbodybulk.php
            <?php
/* @var $this SiteController */
/* @var $model ContactForm */
/* @var $form CActiveForm */
?>
<script src="<?php echo Yii::app()->baseUrl.'/ckeditor/ckeditor.js'; ?>"></script>
<script>
function getVal(val){
	document.getElementById("correct_ans").value=val;
}
//function ck_editor(id){
	
	 //CKEDITOR.replace(id);
	
//}
</script>
<script type="text/javascript">
	$('body').on('change', 'select#QuestionanswerbulkForm_exam_name', function(event){
		var value = document.getElementById("QuestionanswerbulkForm_exam_name").value;
		//alert(value);
		$.ajax({
			url : '<?php echo Yii::app()->request->baseUrl; ?>/webadmin/ajaxpage',
			type : 'POST',
			data : 'value=' + value+'&flag='+1,
			//dataType : 'json',
			beforeSend : function(jqXHR, settings ){
				//alert(1);
			},
			success : function( data, textStatus, jqXHR){
				//alert(data);
				$('#QuestionanswerbulkForm_subject_name').html(data);
			},
			error : function( jqXHR, textStatus, errorThrown){
			
			}
		});
	});
	
	
	$('body').on('change', 'select#QuestionanswerbulkForm_subject_name', function(event){
		var value = document.getElementById("QuestionanswerbulkForm_exam_name").value;
		var value2 = document.getElementById("QuestionanswerbulkForm_subject_name").value;
		//alert(value);
		$.ajax({
			url : '<?php echo Yii::app()->request->baseUrl; ?>/webadmin/ajaxpage',
			type : 'POST',
			data : 'value=' + value+'&subject='+value2+'&flag='+2,
			//dataType : 'json',
			beforeSend : function(jqXHR, settings ){
				//alert(1);
			},
			success : function( data, textStatus, jqXHR){
				//alert(data);
				$('#QuestionanswerbulkForm_paper_name').html(data);
			},
			error : function( jqXHR, textStatus, errorThrown){
			
			}
		});
	});
</script>
    
 
    
<h1>Setup Question Batch</h1>
<?php if(Yii::app()->user->hasFlash('error')): ?>
<div class="flash-error">
	<?php echo Yii::app()->user->getFlash('error'); ?>
</div>
<?php endif; ?>
<?php if(Yii::app()->user->hasFlash('subjectbody')): ?>
<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('subjectbody'); ?>
</div>
<?php else: ?>
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'qusansbulk-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
	'htmlOptions' => array(
        'enctype' => 'multipart/form-data',
    ),
)); ?>
	<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,'exam_name'); ?>
		<?php echo $form->dropDownList($model,'exam_name',$allSubjectarray, array('id'=>'QuestionanswerbulkForm_exam_name','prompt'=>'Select exam body','options' => array($editRecord['exam_id']=>array('selected'=>true))));?>
		<?php echo $form->error($model,'exam_name'); ?>
	</div>
   
    <div class="row">
		<?php echo $form->labelEx($model,'subject_name'); ?>
		<?php echo $form->dropDownList($model,'subject_name', $subject , array('prompt'=>'Select exam body','options' => array($editRecord['subject_id']=>array('selected'=>true))));?>
		<?php echo $form->error($model,'subject_name'); ?>
	</div>
	  
    <div class="row">
		<?php echo $form->labelEx($model,'paper_name'); ?>
		<?php echo $form->dropDownList($model,'paper_name', $paper , array('prompt'=>'Select subject name','options' => array($editRecord['paper_id']=>array('selected'=>true))));?>
		<?php echo $form->error($model,'paper_name'); ?>
	</div>
	
    <div class="row">
		<?php echo $form->labelEx($model,'qusfile',array('label'=>'Qus File')); ?>
		<?php
            $this->widget('CMultiFileUpload', array(
                'name' => 'qusfile',
                'accept' => 'csv', 
                'duplicate' => 'Duplicate file', 
                'denied' => 'Invalid file type,select .CSV file', 
                'max'	=> '1',
            ));
            
        ?>
        <?php echo $form->error($model,'qusfile'); ?>
           <font color="#FF0000">(Select .CSV extention file)</font>
           <div class="clear"></div>
	</div>
    
	<div class="row buttons">
		<?php echo CHtml::submitButton('Submit'); ?>
        <?php //$link = Yii::app()->request->baseUrl.'/webadmin/subjectlist/'; ?>
       <!-- <a href="<?php echo Yii::app()->request->baseUrl; ?>/webadmin/subjectlist/" style="text-decoration:none">-->
       <a href="javascript:window.history.back();" style="text-decoration:none">
       
        <?php echo CHtml::Button('Cancel'); ?>
        </a>
	</div>
    
  
<?php $this->endWidget(); ?>
</div><!-- form -->
<?php endif; ?>
                                          Directory Contents
Dirs: 1 × Files: 36