| Current Path : /var/www/html/hr/views/leaveapplication/ |
| Current File : /var/www/html/hr/views/leaveapplication/_search2.php |
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use app\models\ParamList;
use app\models\User;
$this->registerCss(".form-search .form-control{margin:0;}
.topsection-search label{margin-right:1em;}");
$ParamList = new ParamList();
$this->registerJs("$('.datepicker').datepicker({
rtl: KTUtil.isRTL(),
todayHighlight: true,
orientation: 'bottom left',
format: 'yyyy-mm-dd',
clearBtn: true,
todayHighlight: true,
});");
?>
<div class="topsection-search mt-4 mb-4">
<?php $form = ActiveForm::begin(['action' => ['index2'], 'method' => 'get', 'options' => ['class' => 'form-inline form-search']]); ?>
<?php
echo $form->field($model, 'user_id')->dropDownList(ArrayHelper::map(User::find()->orderBy(['name' => SORT_ASC])->all(), 'id', 'name'), [
'class' => 'form-control kt-selectpicker mr-3',
'data-width' => '200px',
'prompt' => '-- Select staff --',
'data-live-search' => 'true'])->label(false);
?>
<?php
echo $form->field($model, 'leave_type')->dropDownList($ParamList->getparamlist(58), [
'class' => 'form-control kt-selectpicker mr-3',
'data-width' => '200px',
'prompt' => '-- Select leave type --',
'data-live-search' => 'true'])->label(false);
?>
<?php
echo $form->field($model, 'status')->dropDownList($ParamList->getparamlist(59), [
'class' => 'form-control kt-selectpicker mr-3',
'data-width' => '200px',
'prompt' => '-- Select status --',
'data-live-search' => 'true'])->label(false);
?>
<div class="input-daterange input-group mr-3" id="kt_datepicker_4_4">
<?= Html::activeTextInput($model, 'start_dt', ['placeholder' => 'Leave start date', 'class' => 'form-control', 'readonly' => true]); ?>
<div class="input-group-append"><span class="input-group-text"><i class="la la-ellipsis-h"></i></span></div>
<?= Html::activeTextInput($model, 'end_dt', ['placeholder' => 'Leave end date', 'class' => 'form-control', 'readonly' => true]); ?>
</div>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-brand']) ?>
<?= Html::a('Reset', ['index2'], ['class' => 'btn btn-outline-brand']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>