Commit 163268f4 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) add protocol selector handling in system_gateway_groups_edit.php

parent f1bc8275
...@@ -148,6 +148,21 @@ legacy_html_escape_form_data($pconfig); ...@@ -148,6 +148,21 @@ legacy_html_escape_form_data($pconfig);
include("head.inc"); include("head.inc");
?> ?>
<script type="text/javascript">
$( document ).ready(function() {
// force protocol on initial selection (only relevant for new items)
$(".act-tier-change").change(function(){
var proto = $(this).data('proto');
$(".act-tier-change").each(function(){
if ($(this).data('proto') != proto) {
$(this).val('0');
}
});
$('.selectpicker').selectpicker('refresh');
});
});
</script>
<body> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
...@@ -197,7 +212,7 @@ include("head.inc"); ...@@ -197,7 +212,7 @@ include("head.inc");
<tr> <tr>
<td><strong><?=$gateway['name'];?></strong></td> <td><strong><?=$gateway['name'];?></strong></td>
<td> <td>
<select name="<?=$gwname;?>" class="selectpicker" data-width='auto'> <select name="<?=$gwname;?>" class="selectpicker act-tier-change" data-width='auto' data-proto="<?=$gateway['ipprotocol'];?>">
<?php <?php
for ($tierId = 0 ; $tierId < 6 ; ++$tierId): for ($tierId = 0 ; $tierId < 6 ; ++$tierId):
$is_selected = false; $is_selected = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment