<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use frontend\components\HtmlHelper;
use kartik\widgets\DateTimePicker;

/* @var $this yii\web\View */
/* @var $model frontend\models\CollectionSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<?php 

$accountOptions =  ['' =>Yii::t('frontend/collection','All')]+ HtmlHelper::mkAccountOptions($model->accounts);

?>

<div class="collection-search">

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


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

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

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

</div>
