From 164c6c005ee423fc85de3ab3d61684ace9d43bbf Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 22 Oct 2017 17:21:00 +0200 Subject: [PATCH] better formatting of postal addres in PDF --- lam/lib/modules/inetOrgPerson.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 908cca08..5370ac20 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -1924,7 +1924,9 @@ class inetOrgPerson extends baseModule implements passwordService { $this->addSimplePDFField($return, 'street', _('Street')); $this->addSimplePDFField($return, 'postOfficeBox', _('Post office box')); $this->addSimplePDFField($return, 'postalCode', _('Postal code')); - $this->addSimplePDFField($return, 'postalAddress', _('Postal address')); + if (!empty($this->attributes['postalAddress'])) { + $this->addPDFKeyValue($return, 'postalAddress', _('Postal address'), str_replace('$', "\n", implode("\n\n", $this->attributes['postalAddress']))); + } $this->addSimplePDFField($return, 'registeredAddress', _('Registered address')); $this->addSimplePDFField($return, 'telephoneNumber', _('Telephone number')); $this->addSimplePDFField($return, 'homePhone', _('Home telephone number'));