<?php

use yii\helpers\Html;
use yii\widgets\Menu;
use yii\widgets\ActiveForm;

$this->title = 'Traffic Flow Settings';
$this->params['breadcrumbs'] = [
    'Mikrotik',
    $this->title,];
?>
<div class="site-plugins">
    <div class = "row">
        <div class="col-lg-3">

            <?php
            echo Menu::widget($menu);
            ?>

        </div> <div class="col-md-9"> <h1 style="margin-top: 0px"> 
                <?= Html::encode($this->title) ?></h1>
                <?php $form = ActiveForm::begin(['id' => 'form-tftp']); ?>
                <?= $form->field($model, 'enabled')->checkBox(); ?>
                <?= $form->field($model, 'interfaces')->dropDownList($interfaces, ['multiple' => 'multiple']); ?>
                <?=
                $form->field($model, 'cache_entries')->dropDownList(['1M' => '1M',
                    '1k' => '1k',
                    '2M' => '2M',
                    '2k' => '2k',
                    '4M' => '4M',
                    '4k' => '4k',
                    '8M' => '8M',
                    '8k' => '8k',
                    '16M' => '16M',
                    '16k' => '16k',
                    '32M' => '32M',
                    '32k' => '32k',
                    '64k' => '64k',
                    '128k' => '128k',
                    '256k' => '256k',
                    '512k' => '512k'
                ]);
                ?>
                <?= $form->field($model, 'active_flow_timeout')->label('Active Flow Timeout'); ?>
                <?= $form->field($model, 'inactive_flow_timeout')->label('Inactive Flow Timeout'); ?>
                <?php echo Html::submitButton('OK', ['class' => 'btn btn-primary', 'name' => 'create-button']); ?>
                <?php echo ' '; ?>
                <?= Html::a('<span class="btn-label">Targets</span>', ['mikrotik/ip/trafficflow/targets/index'], ['class' => 'btn btn-primary']) ?>
        </div>
        <?php ActiveForm::end(); ?> 
    </div>
</div>
</div>