<?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 = 'CAP';
$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) ?></h1>
                <?php
                $key['none'] = 'none';
                $key['request'] = 'request';
                $items[''] = '';
                $discovery[''] = '';
                ?>
                <?php $form = ActiveForm::begin(['id' => 'form-proxy']); ?>
                <?= $form->field($model, 'enabled')->checkBox(); ?>
                <?= $form->field($model, 'interfaces')->dropDownList($items, ['multiple' => true]); ?>
                <?= $form->field($model, 'certificate')->dropDownList($key); ?>
                <?= $form->field($model, 'discovery_interfaces')->dropDownList($discovery, ['multiple' => true]); ?>
                <?= $form->field($model, 'lock_to_caps_man')->checkBox(['label' => 'Lock To CAPsMAN']); ?>
                <?= $form->field($model, 'caps_man_addresses')->label('CAPsMAN Addresses'); ?>
                <?= $form->field($model, 'caps_man_names')->label('CAPsMAN Names'); ?>
                <?= $form->field($model, 'caps_man_certificate_common_names')->label('CAPsMAN Certificate Common Names'); ?>
                <?= $form->field($model, 'bridge')->dropDownList($bridge); ?>
                <?php
                echo Html::submitButton('OK', ['class' => 'btn btn-primary', 'name' => 'create-button']);
                ?></div>
            <?php ActiveForm::end();
            ?> 
    </div>
</div>
</div>