<?php
$interNames['all ethernet'] = 'all ethernet';
$interNames['all ppp'] = 'all ppp';
$interNames['all vlan'] = 'all vlan';
$interNames['all wireless'] = 'all wireless';
//var_dump($packetMark);
?>
<label class="control-label" for="firewall-nat">Chain</label>
<input type="text" class="form-control" name="Nat[chain]" list="chain" value=<?php echo $model->chain ?>>
<datalist id="chain">
    <option value="srcnat">srcnat</option>
    <option value="dstnat">dstnat</option>
    <?php
    foreach ($chains as $value) {
        echo "<option value=$value>$value</option>";
    }
    ?>

</datalist>
<?= $form->field($model, 'src_address')->label('SRC. Address'); ?>
<?= $form->field($model, 'dst_address')->label('DST. Address'); ?>
<?= $form->field($model, 'protocol'); ?>
<?= $form->field($model, 'src_port')->label('SRC. Port'); ?>
<?= $form->field($model, 'dst_port')->label('DST. Port'); ?>

<?= $form->field($model, 'in_interface')->dropDownList($interNames); ?>
<?= $form->field($model, 'out_interface')->dropDownList($interNames); ?>
<label class="control-label" for="firewall-nat">Packet Mark</label>
<input type="text" class="form-control" name="Nat[packet_mark]" list="packet_mark" value=<?php echo $model->packet_mark ?>>
<datalist id="packet_mark">

    <option value="no-mark">no-mark</option>";
    <?php
    foreach ($packetMark['packet'] as $value) {
        echo "<option value=$value>$value</option>";
    }
    ?>

</datalist></br>
<label class="control-label" for="firewall-nat">Connection Mark</label>
<input type="text" class="form-control" name="Nat[connection_mark]" list="connection_mark" value=<?php echo $model->connection_mark ?>>
<datalist id="connection_mark">

    <option value="no-mark">no-mark</option>";
    <?php
    foreach ($packetMark['connection'] as $value) {
        echo "<option value=$value>$value</option>";
    }
    ?>


</datalist>
</br>
<label class="control-label" for="firewall-nat">Routing Mark</label>
<input type="text" class="form-control" name="Nat[routing_mark]" list="routing_mark" value=<?php echo $model->routing_mark ?>>
<datalist id="routing_mark">

    <option value="main">main</option>";
    <?php
    foreach ($packetMark['routing'] as $value) {
        echo "<option value=$value>$value</option>";
    }
    ?>


</datalist>
</br>

<?=
$form->field($model, 'connection_type')->dropDownlist(['' => '',
    'ftp' => 'ftp',
    'h323' => 'h323',
    'irc' => 'irc',
    'pptp' => 'pptp',
    'quake3' => 'quake3',
    'sip' => 'sip',
    'tftp' => 'tftp',
    '!ftp' => '!ftp',
    '!h323' => '!h323',
    '!irc' => '!irc',
    '!pptp' => '!pptp',
    '!quake3' => '!quake3',
    '!sip' => '!sip',
    '!tftp' => '!tftp']);
?>
