reduced PDF code
This commit is contained in:
parent
e9d980663c
commit
4230f78268
|
@ -229,12 +229,8 @@ class account extends baseModule {
|
||||||
*/
|
*/
|
||||||
function get_pdfEntries() {
|
function get_pdfEntries() {
|
||||||
$return = array();
|
$return = array();
|
||||||
$description = '';
|
$this->addSimplePDFField($return, 'description', _('Description'));
|
||||||
if (isset($this->attributes['description'][0])) {
|
$this->addSimplePDFField($return, 'uid', _('User name'));
|
||||||
$description = $this->attributes['description'][0];
|
|
||||||
}
|
|
||||||
$return['account_description'] = array('<block><key>' . _('Description') . '</key><value>' . $description . '</value></block>');
|
|
||||||
$return['account_uid'] = array('<block><key>' . _('User name') . '</key><value>' . $this->attributes['uid'][0] . '</value></block>');
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2344,151 +2344,37 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
* @return array list of possible PDF entries
|
* @return array list of possible PDF entries
|
||||||
*/
|
*/
|
||||||
function get_pdfEntries() {
|
function get_pdfEntries() {
|
||||||
$description = '';
|
$return = array();
|
||||||
if (isset($this->attributes['description'][0])) $description = implode(', ', $this->attributes['description']);
|
$this->addSimplePDFField($return, 'description', _('Description'));
|
||||||
$title = '';
|
$this->addSimplePDFField($return, 'title', _('Job title'));
|
||||||
if (isset($this->attributes['title'][0])) {
|
$this->addSimplePDFField($return, 'givenName', _('First name'));
|
||||||
$title = implode(', ', $this->attributes['title']);
|
$this->addSimplePDFField($return, 'sn', _('Last name'));
|
||||||
}
|
$this->addSimplePDFField($return, 'manager', _('Manager'));
|
||||||
$givenName = '';
|
$this->addSimplePDFField($return, 'street', _('Street'));
|
||||||
if (isset($this->attributes['givenName'][0])) $givenName = $this->attributes['givenName'][0];
|
$this->addSimplePDFField($return, 'postOfficeBox', _('Post office box'));
|
||||||
$lastName = '';
|
$this->addSimplePDFField($return, 'postalCode', _('Postal code'));
|
||||||
if (isset($this->attributes['sn'][0])) {
|
$this->addSimplePDFField($return, 'postalAddress', _('Postal address'));
|
||||||
$lastName = $this->attributes['sn'][0];
|
$this->addSimplePDFField($return, 'registeredAddress', _('Registered address'));
|
||||||
}
|
$this->addSimplePDFField($return, 'telephoneNumber', _('Telephone number'));
|
||||||
$manager = '';
|
$this->addSimplePDFField($return, 'homePhone', _('Home telephone number'));
|
||||||
if (isset($this->attributes['manager'][0])) {
|
$this->addSimplePDFField($return, 'mobileTelephoneNumber', _('Mobile number'), 'mobile');
|
||||||
$manager = $this->attributes['manager'][0];
|
$this->addSimplePDFField($return, 'mail', _('Email address'));
|
||||||
}
|
$this->addSimplePDFField($return, 'cn', _('Common name'));
|
||||||
$street = '';
|
$this->addSimplePDFField($return, 'facsimileTelephoneNumber', _('Fax number'));
|
||||||
if (isset($this->attributes['street'][0])) {
|
$this->addSimplePDFField($return, 'roomNumber', _('Room number'));
|
||||||
$street = implode(', ', $this->attributes['street']);
|
$this->addSimplePDFField($return, 'businessCategory', _('Business category'));
|
||||||
}
|
$this->addSimplePDFField($return, 'uid', _('User name'));
|
||||||
$postOfficeBox = '';
|
$this->addSimplePDFField($return, 'carLicense', _('Car license'));
|
||||||
if (isset($this->attributes['postOfficeBox'][0])) {
|
$this->addSimplePDFField($return, 'state', _('State'), 'st');
|
||||||
$postOfficeBox = implode(', ', $this->attributes['postOfficeBox']);
|
$this->addSimplePDFField($return, 'officeName', _('Office name'), 'physicalDeliveryOfficeName');
|
||||||
}
|
$this->addSimplePDFField($return, 'employeeType', _('Employee type'));
|
||||||
$postalCode = '';
|
$this->addSimplePDFField($return, 'location', _('Location'), 'l');
|
||||||
if (isset($this->attributes['postalCode'][0])) {
|
$this->addSimplePDFField($return, 'employeeNumber', _('Employee number'));
|
||||||
$postalCode = implode(', ', $this->attributes['postalCode']);
|
$this->addSimplePDFField($return, 'ou', _('Organisational unit'));
|
||||||
}
|
$this->addSimplePDFField($return, 'o', _('Organisation'));
|
||||||
$postalAddress = '';
|
$this->addSimplePDFField($return, 'initials', _('Initials'));
|
||||||
if (isset($this->attributes['postalAddress'][0])) {
|
$this->addSimplePDFField($return, 'labeledURI', _('Web site'));
|
||||||
$postalAddress = implode(', ', $this->attributes['postalAddress']);
|
$this->addSimplePDFField($return, 'departmentNumber', _('Department'));
|
||||||
}
|
|
||||||
$registeredAddress = '';
|
|
||||||
if (isset($this->attributes['registeredAddress'][0])) {
|
|
||||||
$registeredAddress = implode(', ', $this->attributes['registeredAddress']);
|
|
||||||
}
|
|
||||||
$telephoneNumber = '';
|
|
||||||
if (isset($this->attributes['telephoneNumber'][0])) {
|
|
||||||
$telephoneNumber = implode(', ', $this->attributes['telephoneNumber']);
|
|
||||||
}
|
|
||||||
$homePhone = '';
|
|
||||||
if (isset($this->attributes['homePhone'][0])) {
|
|
||||||
$homePhone = implode(', ', $this->attributes['homePhone']);
|
|
||||||
}
|
|
||||||
$mobile = '';
|
|
||||||
if (isset($this->attributes['mobile'][0])) {
|
|
||||||
$mobile = implode(', ', $this->attributes['mobile']);
|
|
||||||
}
|
|
||||||
$mail = '';
|
|
||||||
if (isset($this->attributes['mail'][0])) {
|
|
||||||
$mail = implode(', ', $this->attributes['mail']);
|
|
||||||
}
|
|
||||||
$cn = '';
|
|
||||||
if (isset($this->attributes['cn'][0])) {
|
|
||||||
$cn = $this->attributes['cn'][0];
|
|
||||||
}
|
|
||||||
$roomNumber = '';
|
|
||||||
if (isset($this->attributes['roomNumber'][0])) {
|
|
||||||
$roomNumber = $this->attributes['roomNumber'][0];
|
|
||||||
}
|
|
||||||
$facsimileTelephoneNumber = '';
|
|
||||||
if (isset($this->attributes['facsimileTelephoneNumber'][0])) {
|
|
||||||
$facsimileTelephoneNumber = implode(', ', $this->attributes['facsimileTelephoneNumber']);
|
|
||||||
}
|
|
||||||
$businessCategory = '';
|
|
||||||
if (isset($this->attributes['businessCategory'][0])) {
|
|
||||||
$businessCategory = implode(', ', $this->attributes['businessCategory']);
|
|
||||||
}
|
|
||||||
$uid = '';
|
|
||||||
if (isset($this->attributes['uid'][0])) {
|
|
||||||
$uid = $this->attributes['uid'][0];
|
|
||||||
}
|
|
||||||
$carLicense = '';
|
|
||||||
if (isset($this->attributes['carLicense'][0])) {
|
|
||||||
$carLicense = $this->attributes['carLicense'][0];
|
|
||||||
}
|
|
||||||
$st = '';
|
|
||||||
if (isset($this->attributes['st'][0])) {
|
|
||||||
$st = implode(', ', $this->attributes['st']);
|
|
||||||
}
|
|
||||||
$physicalDeliveryOfficeName = '';
|
|
||||||
if (isset($this->attributes['physicalDeliveryOfficeName'][0])) {
|
|
||||||
$physicalDeliveryOfficeName = implode(', ', $this->attributes['physicalDeliveryOfficeName']);
|
|
||||||
}
|
|
||||||
$employeeType = '';
|
|
||||||
if (isset($this->attributes['employeeType'][0])) $employeeType = $this->attributes['employeeType'][0];
|
|
||||||
$l = '';
|
|
||||||
if (isset($this->attributes['l'][0])) {
|
|
||||||
$l = implode(', ', $this->attributes['l']);
|
|
||||||
}
|
|
||||||
$employeeNumber = '';
|
|
||||||
if (isset($this->attributes['employeeNumber'][0])) {
|
|
||||||
$employeeNumber = $this->attributes['employeeNumber'][0];
|
|
||||||
}
|
|
||||||
$ou = '';
|
|
||||||
if (isset($this->attributes['ou'][0])) {
|
|
||||||
$ou = implode(', ', $this->attributes['ou']);
|
|
||||||
}
|
|
||||||
$o = '';
|
|
||||||
if (isset($this->attributes['o'][0])) {
|
|
||||||
$o = implode(', ', $this->attributes['o']);
|
|
||||||
}
|
|
||||||
$initials = '';
|
|
||||||
if (isset($this->attributes['initials'][0])) {
|
|
||||||
$initials = implode(', ', $this->attributes['initials']);
|
|
||||||
}
|
|
||||||
$labeledURI = '';
|
|
||||||
if (isset($this->attributes['labeledURI'][0])) {
|
|
||||||
$labeledURI = implode(', ', $this->attributes['labeledURI']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$return = array(
|
|
||||||
get_class($this) . '_description' => array('<block><key>' . _('Description') . '</key><value>' . $description . '</value></block>'),
|
|
||||||
get_class($this) . '_title' => array('<block><key>' . _('Job title') . '</key><value>' . $title . '</value></block>'),
|
|
||||||
get_class($this) . '_givenName' => array('<block><key>' . _('First name') . '</key><value>' . $givenName . '</value></block>'),
|
|
||||||
get_class($this) . '_sn' => array('<block><key>' . _('Last name') . '</key><value>' . $lastName . '</value></block>'),
|
|
||||||
get_class($this) . '_employeeType' => array('<block><key>' . _('Employee type') . '</key><value>' . $employeeType . '</value></block>'),
|
|
||||||
get_class($this) . '_manager' => array('<block><key>' . _('Manager') . '</key><value>' . $manager . '</value></block>'),
|
|
||||||
get_class($this) . '_street' => array('<block><key>' . _('Street') . '</key><value>' . $street . '</value></block>'),
|
|
||||||
get_class($this) . '_postOfficeBox' => array('<block><key>' . _('Post office box') . '</key><value>' . $postOfficeBox . '</value></block>'),
|
|
||||||
get_class($this) . '_postalCode' => array('<block><key>' . _('Postal code') . '</key><value>' . $postalCode . '</value></block>'),
|
|
||||||
get_class($this) . '_postalAddress' => array('<block><key>' . _('Postal address') . '</key><value>' . $postalAddress . '</value></block>'),
|
|
||||||
get_class($this) . '_registeredAddress' => array('<block><key>' . _('Registered address') . '</key><value>' . $registeredAddress . '</value></block>'),
|
|
||||||
get_class($this) . '_telephoneNumber' => array('<block><key>' . _('Telephone number') . '</key><value>' . $telephoneNumber . '</value></block>'),
|
|
||||||
get_class($this) . '_homePhone' => array('<block><key>' . _('Home telephone number') . '</key><value>' . $homePhone . '</value></block>'),
|
|
||||||
get_class($this) . '_mobileTelephoneNumber' => array('<block><key>' . _('Mobile number') . '</key><value>' . $mobile . '</value></block>'),
|
|
||||||
get_class($this) . '_facsimileTelephoneNumber' => array('<block><key>' . _('Fax number') . '</key><value>' . $facsimileTelephoneNumber . '</value></block>'),
|
|
||||||
get_class($this) . '_mail' => array('<block><key>' . _('Email address') . '</key><value>' . $mail . '</value></block>'),
|
|
||||||
get_class($this) . '_cn' => array('<block><key>' . _('Common name') . '</key><value>' . $cn . '</value></block>'),
|
|
||||||
get_class($this) . '_roomNumber' => array('<block><key>' . _('Room number') . '</key><value>' . $roomNumber . '</value></block>'),
|
|
||||||
get_class($this) . '_businessCategory' => array('<block><key>' . _('Business category') . '</key><value>' . $businessCategory . '</value></block>'),
|
|
||||||
get_class($this) . '_uid' => array('<block><key>' . _('User name') . '</key><value>' . $uid . '</value></block>'),
|
|
||||||
get_class($this) . '_carLicense' => array('<block><key>' . _('Car license') . '</key><value>' . $carLicense . '</value></block>'),
|
|
||||||
get_class($this) . '_location' => array('<block><key>' . _('Location') . '</key><value>' . $l . '</value></block>'),
|
|
||||||
get_class($this) . '_state' => array('<block><key>' . _('State') . '</key><value>' . $st . '</value></block>'),
|
|
||||||
get_class($this) . '_officeName' => array('<block><key>' . _('Office name') . '</key><value>' . $physicalDeliveryOfficeName . '</value></block>'),
|
|
||||||
get_class($this) . '_ou' => array('<block><key>' . _('Organisational unit') . '</key><value>' . $ou . '</value></block>'),
|
|
||||||
get_class($this) . '_o' => array('<block><key>' . _('Organisation') . '</key><value>' . $o . '</value></block>'),
|
|
||||||
get_class($this) . '_employeeNumber' => array('<block><key>' . _('Employee number') . '</key><value>' . $employeeNumber . '</value></block>'),
|
|
||||||
get_class($this) . '_initials' => array('<block><key>' . _('Initials') . '</key><value>' . $initials . '</value></block>'),
|
|
||||||
get_class($this) . '_labeledURI' => array('<block><key>' . _('Web site') . '</key><value>' . $labeledURI . '</value></block>'),
|
|
||||||
);
|
|
||||||
if (isset($this->attributes['departmentNumber'])) {
|
|
||||||
$return[get_class($this) . '_departmentNumber'] = array('<block><key>' . _('Department') . '</key><value>' . implode(', ', $this->attributes['departmentNumber']) . '</value></block>');
|
|
||||||
}
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue