better formatting of postal addres in PDF

This commit is contained in:
Roland Gruber 2017-10-22 17:21:00 +02:00
parent 44fbc4b507
commit 164c6c005e
1 changed files with 3 additions and 1 deletions

View File

@ -1924,7 +1924,9 @@ class inetOrgPerson extends baseModule implements passwordService {
$this->addSimplePDFField($return, 'street', _('Street')); $this->addSimplePDFField($return, 'street', _('Street'));
$this->addSimplePDFField($return, 'postOfficeBox', _('Post office box')); $this->addSimplePDFField($return, 'postOfficeBox', _('Post office box'));
$this->addSimplePDFField($return, 'postalCode', _('Postal code')); $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, 'registeredAddress', _('Registered address'));
$this->addSimplePDFField($return, 'telephoneNumber', _('Telephone number')); $this->addSimplePDFField($return, 'telephoneNumber', _('Telephone number'));
$this->addSimplePDFField($return, 'homePhone', _('Home telephone number')); $this->addSimplePDFField($return, 'homePhone', _('Home telephone number'));