From a98ca5d09e19d926b796e587732d81d048a76473 Mon Sep 17 00:00:00 2001 From: alec Date: Tue, 18 Oct 2011 13:58:18 +0000 Subject: - Hide contact tabs with no content git-svn-id: https://svn.roundcube.net/trunk@5344 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/addressbook/func.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'roundcubemail/program') diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc index fc559e6ae..0b045c9fd 100644 --- a/roundcubemail/program/steps/addressbook/func.inc +++ b/roundcubemail/program/steps/addressbook/func.inc @@ -662,6 +662,9 @@ function rcmail_contact_form($form, $record, $attrib = null) $rows); } + if (empty($content)) + continue; + // also render add-field selector if ($edit_mode) $content .= html::p('addfield', $select_add->show(null, array('style' => $select_add->_count ? null : 'display:none'))); @@ -672,7 +675,8 @@ function rcmail_contact_form($form, $record, $attrib = null) $content = $fieldset['content']; } - $out .= html::tag('fieldset', null, html::tag('legend', null, Q($fieldset['name'])) . $content) ."\n"; + if ($content) + $out .= html::tag('fieldset', null, html::tag('legend', null, Q($fieldset['name'])) . $content) ."\n"; } if ($edit_mode) { -- cgit v1.2.3