<?php
/* @var $this SystemsetupController */
/* @var $model Systemsetup */
/* @var $form CActiveForm */
?>

<div class="form">

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

	<p class="note">带<span class="required">*</span>号的是必填内容。</p>

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

	<div class="row">
		<?php echo $form->labelEx($model,'systemName'); ?>
		<?php echo $form->textField($model,'systemName',array('size'=>60,'maxlength'=>64,'class'=>"easyui-validatebox",'data-options'=>"required:true")); ?>
		<?php echo $form->error($model,'systemName'); ?>
	</div>

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

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

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

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

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

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

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

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

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

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

</div><!-- form -->

<script type="text/javascript">

    CKEDITOR.replace("Systemsetup[description]",
      {
        skin: "v2", width:"835", height:"300",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',
    //filebrowserBrowseUrl : 'ckeditor/ckfinder/ckfinder.html',
    //filebrowserImageBrowseUrl : 'ckeditor/ckfinder/ckfinder.html?Type=Images',
    //filebrowserFlashBrowseUrl : 'ckeditor/ckfinder/ckfinder.html?Type=Flash',
    //filebrowserUploadUrl : 'ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
    //filebrowserImageUploadUrl : 'ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
    //filebrowserFlashUploadUrl : 'ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
      });
	  
    CKEDITOR.replace("Systemsetup[notice]",
      {
        skin: "v2", width:"835", height:"300",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',
      });
    CKEDITOR.replace("Systemsetup[help]",
      {
        skin: "v2", width:"835", height:"300",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>