<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\widgets\DatePicker;
use common\models\Ticket;

/* @var $this yii\web\View */
/* @var $model common\models\Ticket */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="ticket-form">

    <?php $form = ActiveForm::begin(); ?>


 
    	
	<div class="row">
		<div class="col-md-4">
     <?=$form->field ( $model, 'startDate' )
     		->widget ( DatePicker::classname (), [ 'pluginOptions' => [ 'autoclose' => true,'format' => 'yyyy.mm.dd'  ]  ] )?>
			</div>
	</div>
	<div class="row">
		<div class="col-md-4">
		    <?=$form->field ( $model, 'endDate'  )->widget ( DatePicker::classname (), [   'pluginOptions' => [ 'autoclose' => true,'format' => 'yyyy.mm.dd' ] ] )?>
		</div>
	</div>

	<div class="row">
		<div class="col-md-4">
    		<?= $form->field($model, 'status')->dropDownList(Ticket::statuses())?>
		</div>
	</div>
	<div class="row">
		<div class="col-md-4">
    		<?= $form->field($model, 'comment')->textInput(['maxlength' => true])?>
		</div>
	</div>


	<div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('common/ticket', 'Create') : Yii::t('common/ticket', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary'])?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
