diff --git a/src/usr/local/www/load_balancer_pool_edit.php b/src/usr/local/www/load_balancer_pool_edit.php index 95dbfee29a..90550c8db1 100644 --- a/src/usr/local/www/load_balancer_pool_edit.php +++ b/src/usr/local/www/load_balancer_pool_edit.php @@ -272,7 +272,7 @@ events.push(function(){ $("#removedisabled").click(function() { $('[name="serversdisabled[]"] option:selected').remove(); }); - + $("#movetodisabled").click(function() { moveOptions($('[name="servers[]"] option'), $('[name="serversdisabled[]"]')); }); @@ -390,11 +390,20 @@ $section = new Form_Section('Current pool members'); $group = new Form_Group('Members'); +$list = array(); + +if (is_array($pconfig['serversdisabled'])) { + foreach ($pconfig['serversdisabled'] as $svrent) { + if ($svrent != '') + $list[$svrent] = $svrent; + } +} + $group->add(new Form_Select( 'serversdisabled', null, $pconfig['serversdisabled'], - is_array($pconfig['serversdisabled']) ? array_combine($pconfig['serversdisabled'], $pconfig['serversdisabled']) : array(), + $list, true ))->setHelp('Disabled'); @@ -452,13 +461,13 @@ print($form);