<?php

use yii\bootstrap\Alert;

if (Yii::$app->session->getFlash('message') != null) {
    echo Alert::widget([
        'options' => [
            'class' => 'alert-info',
        ],
        'body' => Yii::$app->session->getFlash('message'),
    ]);
}

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

$this->title = 'Station Connect Rule';
$this->params['breadcrumbs'] = [
    'Mikrotik',
    'Wireless',
    $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);
                $items['default'] = '';
                ?></h1>
            <?php $form = ActiveForm::begin(['id' => 'form-proxy']); ?>
            <?= $form->field($model, 'interface')->dropDownList($interfaces); ?>
            <?= $form->field($model, 'mac_address')->label('MAC Address'); ?>
            <?= $form->field($model, 'connect')->checkBox(); ?>
            <?= $form->field($model, 'ssid')->label('SSID'); ?>
            <?= $form->field($model, 'area_prefix')->label('Area Prefix'); ?>
            <?= $form->field($model, 'signal_range')->label('Signal Strength Range'); ?>
            <?=
            $form->field($model, 'wireless_protocol')->dropDownList(['any' => 'any',
                '802.11' => '802.11',
                'nstreme' => 'nstreme',
                'tdma' => 'tdma',
            ]);
            $items['default'] = 'default';
            $items['none'] = 'none';
            ?>
            <?= $form->field($model, 'security_profile')->dropDownList($items); ?>
            <?php
            if ($action == 'update') {
                echo Html::submitButton('Update', ['class' => 'btn btn-primary', 'name' => 'create-button']);
            } else {
                echo Html::submitButton('Create', ['class' => 'btn btn-primary', 'name' => 'create-button']);
            }
            ?></div>
            <?php ActiveForm::end();
            ?> 
    </div>
</div>
</div>