<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\TicketInstallmentRequest;
use common\models\TicketType;
use yii\helpers\ArrayHelper;
use kartik\widgets\DatePicker;

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

<?php 
$ticketTypeOptions =  ['' => 'Mind'] +	  ArrayHelper::map(TicketType::read(), 'id_ticket_type', 'name');

?>

<div class="ticket-installment-request-search">

    <?php $form = ActiveForm::begin([
        'action' => ['pending'],
        'method' => 'get',
    ]); ?>

	<div class="row">
		<div class="col-md-3">
    		<?= $form->field($model, 'id_ticket_installment_request')->label("Megbízás azonosító") ?>
		</div>

		<div class="col-md-3">
		    <?= $form->field($model, 'id_ticket')->label("Bérlet azonosító") ?>
		</div>
		<div class="col-md-3">
		    <?= $form->field($model, 'id_customer')->label("Vendég azonosító") ?>
		</div>
	</div>
	<div class="row">
	<div class="col-md-3">
		    <?= $form->field($model, 'id_contract')->label("Szerződés azonosító") ?>
		</div>
		<div class="col-md-3">
		    <?= $form->field($model, 'customer_name')->label("Vendég neve") ?>
		</div>
		<div class="col-md-3">
		    <?= $form->field($model, 'id_ticket_type')->label("Bérlet típus")->dropDownList(  $ticketTypeOptions) ?>
		</div>
		<div class="col-md-3">
		</div>
	</div>
	<div class="row">
		<div class="col-md-3">
		    <?= $form->field($model, 'start')->widget(DatePicker::classname(), [
    			 'pluginOptions' => [
				        'autoclose'=>true,
				        'format' => 'yyyy.mm.dd'
				    ]
				])->label('Megbízás inditására irányzott kezdete ( inklúzív )')  ?>
		</div>
		<div class="col-md-3">
		    <?= $form->field($model, 'end') ->widget(DatePicker::classname(), [
    			 'pluginOptions' => [
				        'autoclose'=>true,
				        'format' => 'yyyy.mm.dd'
				    ]
				])->label('Megbízás inditására irányzott dátum vége ( exklúzív )')  ?>
		</div>
	</div>
 

    <div class="form-group">
        <?= Html::submitButton(Yii::t('common/ticket_installment_request', 'Search'), ['class' => 'btn btn-primary']) ?>
    </div>

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

</div>
