From f212adc8f46064152cb473986c975c1b4255fbc1 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 11 May 2016 13:44:45 +0930 Subject: hideMask only modify input-group on first parent Otherwise when unhiding (e.g. for Network type alias), input-group gets added to every div up the DM hierarchy and the layout gets messed up. --- src/usr/local/www/js/pfSenseHelpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/js/pfSenseHelpers.js b/src/usr/local/www/js/pfSenseHelpers.js index 0283b11..dadcf9f 100644 --- a/src/usr/local/www/js/pfSenseHelpers.js +++ b/src/usr/local/www/js/pfSenseHelpers.js @@ -143,11 +143,11 @@ function hideMask(name, hide) { if(hide) { $('[id^=' + name + ']').hide(); $('[id^=' + name + ']').prev('span').hide(); - $('[id^=' + name + ']').parents('div').removeClass('input-group'); + $('[id^=' + name + ']').parent('div').removeClass('input-group'); } else { $('[id^=' + name + ']').show(); $('[id^=' + name + ']').prev('span').show(); - $('[id^=' + name + ']').parents('div').addClass('input-group'); + $('[id^=' + name + ']').parent('div').addClass('input-group'); } } -- cgit v1.1