<?php
/* @var $this TicketController */
/* @var $model Ticket */
/* @var $form CActiveForm */
?>

<?php
$form = $this->beginWidget('ext.bootstrap.widgets.TbActiveForm', array(
            'action' => Yii::app()->createUrl($this->route),
            'method' => 'get',
        ));


echo $form->textFieldRow($model, 'id');

echo $form->textFieldRow($model, 'badge_id');

echo $form->textFieldRow($model, 'person_id');

//echo $form->textFieldRow($model, 'date_time');
echo $form->labelEx($model, 'date_time');

$this->widget('application.extensions.timepicker.timepicker', array(
    'model' => $model,
    'name' => 'date_time',
    'select' => 'date',
    'options' => array(
        'timeFormat' => 'hh:mm',
        'showOn' => 'focus',
        'showSecond' => false,
        'changeMonth' => false,
        'changeYear' => false,
        'tabularLevel' => null,
        'regional' => 'nl',
    ),
));


echo $form->dropDownListRow($model, 'schedule_id', CHtml::listData(Schedule::getAll("Active"), 'name', 'name'), array('empty' => Yii::t('default', 'Select Schedule')));

echo $form->dropDownListRow($model, 'pos_id', CHtml::listData(POS::getAll("Active"), 'name', 'name'), array('empty' => Yii::t('default', 'Select Reason')));

echo $form->textFieldRow($model, 'quantity');

echo $form->dropDownListRow($model, 'user_id', CHtml::listData(User::getAll("Active"), 'id', 'identifier'), array('empty' => Yii::t('default', 'Select User')));

echo $form->dropDownListRow($model, 'department_id', CHtml::listData(Department::getAll("Active"), 'name', 'name'), array('empty' => Yii::t('default', 'Select Department')));

echo $form->dropDownListRow($model, 'issuing_reason_id', CHtml::listData(IssuingReason::getAll("Active"), 'reason', 'reason'), array('empty' => Yii::t('default', 'Select Reason')));

echo $form->radioButtonListInlineRow($model, 'cancelled', array('1' => Yii::t('default', 'Yes'), '0' => Yii::t('default', 'No')));

echo $form->radioButtonListInlineRow($model, 'issued_at_server', array('1' => Yii::t('default', 'Yes'), '0' => Yii::t('default', 'No')));

?>
<div class="actions">
<?php echo CHtml::submitButton(Yii::t('default', 'Search'), array('class' => 'btn primary')); ?>
</div>

<?php $this->endWidget(); ?>