Skip to content

Commit

Permalink
firewall, alias, fix geoip sorting and replace select for a searchabl…
Browse files Browse the repository at this point in the history
…e selectpicker, see opnsense#1860
  • Loading branch information
AdSchellevis committed Oct 15, 2017
1 parent 86998f1 commit ea0a8ce
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/www/firewall_aliases_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function geoip_countries()
$result[$code] = $name;
}
}
uasort($result, function($a, $b) {return strcasecmp($a, $b);});
return $result;
}

Expand Down Expand Up @@ -386,13 +387,19 @@ function addFieldTypeAhead() {
$('#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);
Expand Down Expand Up @@ -603,7 +610,7 @@ function toggleType() {
<div style="cursor:pointer;" class="act-removerow btn btn-default btn-xs" alt="remove"><span class="glyphicon glyphicon-minus"></span></div>
</td>
<td>
<select class="geoip_list hidden">
<select class="geoip_list selectpicker hidden" data-live-search="true" data-size="10">
</select>
<input type="text" class="host_url fld_detail" name="host_url[]" value="<?=$aliasurl;?>"/>
</td>
Expand Down

0 comments on commit ea0a8ce

Please sign in to comment.