<?php

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

$this->title = 'DHCP Client status';
$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-tftp']); ?>
                <?= $form->field($model, 'ip_addresses')->label('IP Addresses'); ?>
                <?= $form->field($model, 'req_filename')->label('Req. Filename'); ?>
                <?= $form->field($model, 'real_filename')->label('Real Filename'); ?>
                <?= $form->field($model, 'allow')->checkBox(); ?>
                <?= $form->field($model, 'read_only')->checkBox(); ?>
                <?= $form->field($model, 'hits')->textInput(['readonly' => true]); ?>
                <?php
                if ($action == 'update') {
                    if ($model->disabled == 'true') {
                        $action_e = 'enable';
                    } else {
                        $action_e = 'disable';
                    }
                    echo Html::submitButton('Update', ['class' => 'btn btn-primary', 'name' => 'create-button']);
                    echo ' ';
                    echo Html::a('<span class="btn-label">' . ucfirst($action_e) . '</span>', [$action_e, 'id' => $model->id], ['class' => 'btn btn-primary']);
                } else {
                    echo Html::submitButton('Create', ['class' => 'btn btn-primary', 'name' => 'create-button']);
                }
                ?>
        </div>
<?php ActiveForm::end(); ?> 
    </div>
</div>
</div>