diff --git a/src/www/firewall_aliases_edit.php b/src/www/firewall_aliases_edit.php index 12cd8b5d1..5fa1c9e54 100644 --- a/src/www/firewall_aliases_edit.php +++ b/src/www/firewall_aliases_edit.php @@ -94,6 +94,7 @@ function geoip_countries() $result[$code] = $name; } } + uasort($result, function($a, $b) {return strcasecmp($a, $b);}); return $result; } @@ -386,13 +387,19 @@ include("head.inc"); $('#detailTable > tbody > tr:last > td > input').each(function(){ $(this).val(""); }); + // cloned a selectpicker, move original select tag out of container and remove selectpicker + $('#detailTable > tbody > tr:last > td > div.btn-group').each(function(){ + $(this).find('select').detach().appendTo($(this).parent()); + $(this).remove(); + }); $(".act-removerow").click(removeRow); // link typeahead to new item addFieldTypeAhead(); // link geoip list to new item $(".geoip_list").change(function(){ - $(this).parent().find('input').val($(this).val()); + $(this).parent().parent().find('input').val($(this).val()); }); + $('.selectpicker').selectpicker(); }); $(".act-removerow").click(removeRow); @@ -603,7 +610,7 @@ endforeach;