<?php

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

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

<div class="discount-form">

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

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

   <?= $form->field($model, 'status')->checkbox( ['value' => 10, 'label' =>    Yii::t('common/discount', "Active") 	]) ?>

	<?= $form->field($model, 'type')->dropDownList(Discount::types())  ?>

    <?= $form->field($model, 'value')->textInput() ?>
    
    <?= $form->field($model, 'product_enabled')->checkbox()  ?>
    
    <?= $form->field($model, 'ticket_enabled')->checkbox()   ?>


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

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

</div>
