<?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 = 'Update DHCP Relay';
$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-dhcpRelay']); ?>
            <?= $form->field($model, 'name'); ?>
            <?= $form->field($model, 'interface')->dropDownList($items, ['options' => [ $x => ['selected ' => true]]]) ?>
            <?= $form->field($model, 'dhcp_server')->label('DHCP Server'); ?>
            <?= $form->field($model, 'delay_threshold')->label('Delay Threshold') ?>
            <?= $form->field($model, 'local_address')->label('Local Address') ?>
        <?= Html::submitButton('Update', ['class' => 'btn btn-primary', 'name' => 'create-button']) ?>
        <?php echo Html::a('<span class="btn-label">' . ucfirst($action) . '</span>', [$action, 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        </div>
<?php ActiveForm::end(); ?> 
    </div>
</div>
</div>