Extended profile - don't show rel for empty phone number

This commit is contained in:
Zach Copley 2011-03-16 14:52:42 -07:00
parent f4ff375dbd
commit 59515d5976

View File

@ -160,9 +160,11 @@ class ExtendedProfileWidget extends Form
protected function showPhone($name, $field)
{
$this->out->elementStart('div', array('class' => 'phone-display'));
$this->out->text($field['value']);
if (!empty($field['rel'])) {
$this->out->text(' (' . $field['rel'] . ')');
if (!empty($field['value'])) {
$this->out->text($field['value']);
if (!empty($field['rel'])) {
$this->out->text(' (' . $field['rel'] . ')');
}
}
$this->out->elementEnd('div');
}