<?php
/* @var $this PostController */
/* @var $model Post */
/* @var $form CActiveForm */
?>


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

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


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

		<div class="form-group row">
			<div class="col-sm-12">
				<?php echo $form->error($model,'title'); ?>
				<?php echo $form->textField($model,'title',array('class'=>'form-control input-lg','placeHolder'=>'ex: Saba Desa Bupati Bandung Tahun '.date('Y'))); ?>
			</div>
		</div>

		<div class="form-group row">
			<div class="col-sm-12">
				<?php echo $form->error($model,'description'); ?>
				<?php echo $form->textArea($model,'description',array('placeHolder'=>'Description','class'=>'form-control')); ?>
			</div>
		</div>


		<div class="form-group row">
			<div class="col-sm-3">
				<?php echo $form->dateField($model,'start_date',array('class'=>'form-control','placeHolder'=>'Ex: 2021-03-26')); ?>
			</div>
			<div class="col-sm-3">
				<?php echo $form->dateField($model,'end_date',array('class'=>'form-control','placeHolder'=>'Ex: 2021-03-26')); ?>
			</div>
			<div class="col-sm-3">
				<?php echo $form->timeField($model,'start_time',array('class'=>'form-control','placeHolder'=>'Ex: 08:00')); ?>
			</div>
			<div class="col-sm-3">
				<?php echo $form->timeField($model,'end_time',array('class'=>'form-control','placeHolder'=>'Ex: 12:00')); ?>
			</div>
		</div>

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

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

