<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\Key;

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

<div class="key-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'number')->textInput(['maxlength' => true]) ?>
    <?= $form->field($model, 'rfid_key')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'status')->dropDownList(  Key::statuses()  ) /*->textInput()*/ ?>

    <?= $form->field($model, 'type')->dropDownList(  Key::types() /* array(10=>"kulcs") // <--ez így ok */ )     /* $form->field($model, 'type')->textInput() */ ?>

    <?php //echo $form->field($model, 'created_at')->textInput() ?>

    <?php //echo $form->field($model, 'updated_at')->textInput() ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('backend/key', 'Create Save') : Yii::t('backend/key', 'Update Save'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

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

</div>
