Skip to content

Commit

Permalink
ui: regression in single host or network subnet select (#3148)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Jan 23, 2019
1 parent 5f4c46e commit 2af9202
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/www/javascript/opnsense_legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 2af9202

@fichtner
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Please sign in to comment.