<?php
/* @var $this PaperController */
/* @var $model Paper */
/* @var $form CActiveForm */
?>


<div class="form-normal form-horizontal clearfix">
	<div class="col-lg-9 col-md-10">

		<?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'paper-form',
			'enableAjaxValidation'=>false,
			'enableClientValidation' => true,
			'clientOptions' => array(
				'validateOnSubmit' => true,
			),
			'errorMessageCssClass' => 'label label-info',
			'htmlOptions' => array('enctype' => 'multipart/form-data','autocomplete'=>'off'),
		)); ?>

		<?php echo $form->errorSummary($model, null, null, array('class' => 'alert alert-warning')); ?>


		<div class="form-group">

			<div class="col-sm-4 control-label">
				<?php echo $form->labelEx($model,'researchers_id'); ?>
			</div>

			<div class="col-sm-8">
				<?php
				echo $form->dropDownList($model, "researchers_id",
					CHtml::listData(Users::model()->findall(array('condition'=>'id_user='.YII::app()->user->record->id_user)),
						'id_user', 'fullname'
					),
					array("empty"=>"-- Pilih Peneliti --", 'class'=>'select2 form-control')
				);
				?>
				<?php echo $form->error($model,'researchers_id'); ?>
			</div>

		</div>


		<div class="form-group">

			<div class="col-sm-4 control-label">
				<?php echo $form->labelEx($model,'paper_name'); ?>
			</div>

			<div class="col-sm-8">
				<?php echo $form->textField($model,'paper_name',array('class'=>'form-control')); ?>
				<?php echo $form->error($model,'paper_name'); ?>
			</div>

		</div>


		<div class="form-group">

			<div class="col-sm-4 control-label">
				<?php echo $form->labelEx($model,'paper_image'); ?>
			</div>

			<div class="col-sm-8">
				<?php echo $form->fileField($model,'paper_image',array('class'=>'btn btn-info')); ?>
				<?php echo $form->error($model,'paper_image'); ?>
			</div>

		</div>


		<div class="form-group">

			<div class="col-sm-4 control-label">
				<?php echo $form->labelEx($model,'paper_file'); ?>
			</div>

			<div class="col-sm-8">
				<?php echo $form->fileField($model,'paper_file',array('class'=>'btn btn-info')); ?>
				<?php echo $form->error($model,'paper_file'); ?>
			</div>

		</div>



		<div class="form-group">
			<div class="col-md-12">
				<?php echo CHtml::submitButton($model->isNewRecord ? 'Simpan' : 'Edit', array('class' => 'btn btn-info btn-flat pull-right')); ?>
			</div>
		</div>

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

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