From 7772ae2477c079af0e80ce5a91dde97139e3fb5a Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Wed, 19 Oct 2011 07:35:49 -0400 Subject: [PATCH] - Another fix to hide empty tabs --- program/steps/addressbook/func.inc | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index 0b045c9..2082dbd 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -657,12 +657,14 @@ } // wrap rows in fieldgroup container - $content .= html::tag('fieldset', array('class' => 'contactfieldgroup ' . ($colprop['subtypes'] ? 'contactfieldgroupmulti ' : '') . 'contactcontroller' . $col, 'style' => ($rows ? null : 'display:none')), - ($colprop['subtypes'] ? html::tag('legend', null, Q($colprop['label'])) : ' ') . - $rows); + if ($rows) { + $content .= html::tag('fieldset', array('class' => 'contactfieldgroup ' . ($colprop['subtypes'] ? 'contactfieldgroupmulti ' : '') . 'contactcontroller' . $col, 'style' => ($rows ? null : 'display:none')), + ($colprop['subtypes'] ? html::tag('legend', null, Q($colprop['label'])) : ' ') . + $rows); + } } - if (empty($content)) + if (!$content) continue; // also render add-field selector -- Gitblit v1.9.1