summaryrefslogtreecommitdiff
path: root/program/steps/addressbook
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-10-18 13:58:18 +0000
committeralecpl <alec@alec.pl>2011-10-18 13:58:18 +0000
commit2df4a9a29cdab38c314c66697da2e3aa60ee91b8 (patch)
tree091b41ab32c23bfe02d412b3437f6a686921291e /program/steps/addressbook
parentc84d3306fff81d0f1a18b3cc6ce43e625ed19dae (diff)
- Hide contact tabs with no content
Diffstat (limited to 'program/steps/addressbook')
-rw-r--r--program/steps/addressbook/func.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index fc559e6ae..0b045c9fd 100644
--- a/program/steps/addressbook/func.inc
+++ b/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) {