<?php

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

$this->title = 'SNMP Community';
$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-Communities']); ?>
                <?= $form->field($model, 'name'); ?>
                <?= $form->field($model, 'addresses'); ?>
                <?= $form->field($model, 'security')->dropDownList(['authorized' => 'authorized', 'private' => 'private', 'none' => 'none']); ?>
                <?= $form->field($model, 'read_access')->checkBox(); ?>
                <?= $form->field($model, 'write_access')->checkBox(); ?>
                <?= $form->field($model, 'authentication_protocol')->dropDownList(['MD5' => 'MD5', 'SHA1' => 'SHA1']); ?>
                <?= $form->field($model, 'encryption_protocol')->dropDownList(['DES' => 'DES', 'AES' => 'AES']); ?>
                <?= $form->field($model, 'authentication_password')->passwordInput()->label('Authentication Password'); ?>
                <?= $form->field($model, 'encryption_password')->passwordInput()->label('Encryption Password'); ?>
                <?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']);
                }

                ActiveForm::end();
                ?>        
        </div>

    </div>
</div>
</div>