<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\widgets\DateTimePicker;

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

$userOptions =  ['' => 'Mind'] +	  \yii\helpers\ArrayHelper::map(\common\models\User::read (), 'id', 'username');
?>

<div class="log-search">

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


	<div class="row">
		<div class="col-md-3">
				
				<?= $form->field($model, 'start')->widget(DateTimePicker::classname(), [
    			 'pluginOptions' => [
				        'autoclose'=>true,
				        'format' => 'yyyy.mm.dd hh:ii'
				    ]
				])  ?>
				
		</div>
		<div class="col-md-3">
		    <?= $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
    			 'pluginOptions' => [
				        'autoclose'=>true,
				        'format' => 'yyyy.mm.dd hh:ii'
				    ]
				])  ?>
		</div>
		 
	</div>

    <div class="row">
        <div class="col-md-3">

            <?= $form->field($model, 'type')->dropDownList( ["" =>"Mind"] + \common\models\Log::getTypes()) ?>

        </div>
        <div class="col-md-3">
            <?= $form->field($model, 'id_user')->dropDownList( $userOptions ) ?>
        </div>

    </div>
	


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

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

</div>
