<?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 = 'OVPN Server';
$this->params['breadcrumbs'] = [
    'Mikrotik',
    'PPP',
    $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
                $certs['none'] = 'none';
                $form = ActiveForm::begin(['id' => 'form-proxy']);
                ?>
                <?= $form->field($model, 'enabled')->checkBox(); ?>
                <?= $form->field($model, 'port')->label('Port'); ?>
                <?=
                $form->field($model, 'mode')->dropDownList(['ip' => 'ip',
                    'ethernet' => 'ethernet']);
                ?>
                <?= $form->field($model, 'netmask')->label('Netmask'); ?>
                <?= $form->field($model, 'mac_address')->label('MAC Address'); ?>
                <?= $form->field($model, 'max_mtu')->label('Max MTU'); ?>
                <?= $form->field($model, 'keepalive_timeout')->label('Keepalive Timeout'); ?>
                <?= $form->field($model, 'default_profile')->dropDownList($items); ?>
                <?= $form->field($model, 'certificate')->dropDownList($certs); ?>
                <?= $form->field($model, 'require_client_certificate')->checkBox(); ?>
                <?php
                echo $form->field($model, 'auth')->dropDownList(['sha1' => 'sha1',
                    'md5' => 'md5',
                    'null' => 'null',
                        ], ['multiple' => true]);
                ?>
                <?php
                echo $form->field($model, 'cipher')->dropDownList(['blowfish128' => 'blowfish128',
                    'aes128' => 'aes128',
                    'aes192' => 'aes192',
                    'aes256' => 'aes256',
                    'null' => 'null',
                        ], ['multiple' => true]);
                ?>
                <?php
                echo Html::submitButton('Ok', ['class' => 'btn btn-primary', 'name' => 'create-button']);
                ?></div>
                <?php ActiveForm::end();
                ?> 
    </div>
</div>
</div>