<?php
/* @var $this MultichoiceController */
/* @var $model Multichoice */
/* @var $form CActiveForm */
?>
<style type="text/css">
		.items,.items2{list-style:none;}
</style>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'operation-form',
	'enableAjaxValidation'=>false,
	'htmlOptions'=>array('enctype' => 'multipart/form-data'),
)); ?>

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

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'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,'tizhi'); ?>
		<?php echo $form->fileField($model,'tizhi'); ?>
		<?php echo $form->error($model,'tizhi'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'answer'); ?>
		<?php echo $form->fileField($model,'answer'); ?>
		<?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("Operation[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>