<?php
/* @var $this JudgeController */
/* @var $model Judge */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'judge-form',
	'enableAjaxValidation'=>false,
)); ?>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>128,'maxlength'=>256)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'tigan'); ?>
		<?php echo $form->textArea($model,'tigan',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'tigan'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'answer'); ?>
		<?php echo $form->radioButtonList($model,'answer',array('正确','错误')); ?>
		<?php echo $form->error($model,'answer'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'knowledgepoint_id'); ?>
		<?php echo $form->dropDownList($model,'knowledgepoint_id',$data,array('empty'=>'暂无')); ?>
		<?php echo $form->error($model,'knowledgepoint_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'charpter_id'); ?>
		<?php echo $form->dropDownList($model,'charpter_id',$data2); ?>
		<?php echo $form->error($model,'charpter_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'frequency'); ?>
		<?php echo $form->textField($model,'frequency'); ?>
		<?php echo $form->error($model,'frequency'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'difficulty'); ?>
		<?php echo $form->textField($model,'difficulty'); ?>
		<?php echo $form->error($model,'difficulty'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'forbidden'); ?>
		<?php echo $form->checkBox($model,'forbidden'); ?>
		<?php echo $form->error($model,'forbidden'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? '创建' : '保存'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
    CKEDITOR.replace("Judge[tigan]",
      {
        skin: "v2", width:"835", height:"200",color:"#AADC6E",toolbar:"Full",language:'zh-cn',
		filebrowserBrowseUrl : '<?php echo Yii::app()->request->baseUrl?>/ckfinder/ckfinder.html',
		filebrowserImageBrowseUrl : '<?php echo Yii::app()->request->baseUrl?>/ckfinder/ckfinder.html?Type=Images',
		filebrowserFlashBrowseUrl : '<?php echo Yii::app()->request->baseUrl?>/ckfinder/ckfinder.html?Type=Flash',
		filebrowserUploadUrl : '<?php echo Yii::app()->request->baseUrl?>/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
		filebrowserImageUploadUrl : '<?php echo Yii::app()->request->baseUrl?>/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
		filebrowserFlashUploadUrl : '<?php echo Yii::app()->request->baseUrl?>/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
      });	  
</script>