ui: regression in single host or network subnet select (https://github.com/opnsense/core/issues/3148)

This commit is contained in:
Ad Schellevis 2019-01-23 22:06:00 +01:00
parent 5f4c46eeff
commit 2af9202d64

View File

@ -48,16 +48,16 @@ function notice_action(action,msgid) {
* @param data_id: data field reference to network input field
*/
function hook_ipv4v6(classname, data_id) {
$("."+classname).each(function(){
$("select."+classname).each(function(){
var selectlist_id = $(this).attr('id');
if ($(this).data(data_id) != undefined) {
$("#"+$(this).data(data_id)).change(function(){
var itemValue = $(this).val();
$("#"+selectlist_id+" > option").each(function() {
if (parseInt($(this).val()) > 32 && itemValue.indexOf(":") == -1 ) {
$(this).addClass('hidden');
$(this).hide()
} else {
$(this).removeClass('hidden');
$(this).show();
}
});
// select highest visible option