<?php
/* @var $this SubController */
/* @var $model Sub */
/* @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'=>'sub-form',
			'enableAjaxValidation'=>false,
			'enableClientValidation' => true,
			'clientOptions' => array(
				'validateOnSubmit' => true,
				),
			'errorMessageCssClass' => 'label label-danger',
			'htmlOptions' => array('class' => 'form-horizontal', 'role' => 'form')
			)); ?>

			<?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,'cluster_id'); ?>
				</div>   

				<div class="col-sm-8">
					<?php echo $form->error($model,'cluster_id'); ?>
					<?php 
					echo $form->dropDownList($model, "cluster_id",
						CHtml::listData(Cluster::model()->findall(array('condition'=>'status=1')),
							'id_cluster', 'name'
							),
						array("empty"=>"-- Pilih Klaster --", 'class'=>'select2 form-control')
						); 
						?> 

					</div>
				</div>


				<div class="form-group">

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

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

				</div>  


				<div class="form-group">

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

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

				</div>  



				<div class="form-group">

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

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

				</div>  


				<div class="form-group">

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

					<div class="col-sm-8">
						<?php echo $form->error($model,'max_point'); ?>
						<?php echo $form->textField($model,'max_point',array('class'=>'form-control')); ?>
					</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 -->