added addPDFKeyValue()
This commit is contained in:
parent
187b51978e
commit
7028ac28e4
|
@ -474,7 +474,7 @@ class pykotaGroup extends baseModule {
|
|||
if (!empty($this->attributes['pykotaLimitBy'][0]) && isset($limitByOptions[$this->attributes['pykotaLimitBy'][0]])) {
|
||||
$limitByValue = $limitByOptions[$this->attributes['pykotaLimitBy'][0]];
|
||||
}
|
||||
$return[get_class($this) . '_pykotaLimitBy'] = array('<block><key>' . _('Limit type') . '</key><value>' . $limitByValue . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'pykotaLimitBy', _('Limit type'), $limitByValue);
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
|
|
@ -595,7 +595,7 @@ class pykotaPrinter extends baseModule {
|
|||
if (!empty($this->attributes['pykotaPassThrough'][0]) && isset($passthroughOptions[$this->attributes['pykotaPassThrough'][0]])) {
|
||||
$passthroughValue = $passthroughOptions[$this->attributes['pykotaPassThrough'][0]];
|
||||
}
|
||||
$return[get_class($this) . '_pykotaPassThrough'] = array('<block><key>' . _('Passthrough') . '</key><value>' . $passthroughValue . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'pykotaPassThrough', _('Passthrough'), $passthroughValue);
|
||||
// members
|
||||
if (!empty($this->attributes['uniqueMember'][0])) {
|
||||
$members = array();
|
||||
|
@ -607,7 +607,7 @@ class pykotaPrinter extends baseModule {
|
|||
$members[] = getAbstractDN($member);
|
||||
}
|
||||
}
|
||||
$return[get_class($this) . '_uniqueMember'] = array('<block><key>' . _('Group members') . '</key><value>' . implode(', ', $members) . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'uniqueMember', _('Group members'), implode(', ', $members));
|
||||
}
|
||||
// printer groups
|
||||
$parentGroups = array();
|
||||
|
@ -621,7 +621,7 @@ class pykotaPrinter extends baseModule {
|
|||
}
|
||||
}
|
||||
if (sizeof($parentGroups) > 0) {
|
||||
$return[get_class($this) . '_parentUniqueMember'] = array('<block><key>' . _('Printer groups') . '</key><value>' . implode(', ', $parentGroups) . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'parentUniqueMember', _('Printer groups'), implode(', ', $parentGroups));
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -898,7 +898,7 @@ class pykotaUser extends baseModule {
|
|||
if (!empty($this->attributes['pykotaLimitBy'][0]) && isset($limitByOptions[$this->attributes['pykotaLimitBy'][0]])) {
|
||||
$limitByValue = $limitByOptions[$this->attributes['pykotaLimitBy'][0]];
|
||||
}
|
||||
$return[get_class($this) . '_pykotaLimitBy'] = array('<block><key>' . _('Limit type') . '</key><value>' . $limitByValue . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'pykotaLimitBy', _('Limit type'), $limitByValue);
|
||||
$this->addSimplePDFField($return, 'pykotaOverCharge', _('Overcharge factor'));
|
||||
$this->addSimplePDFField($return, 'pykotaBalance', _('Balance'));
|
||||
$this->addSimplePDFField($return, 'pykotaLifeTimePaid', _('Total paid'));
|
||||
|
|
|
@ -614,17 +614,17 @@ class sambaDomain extends baseModule {
|
|||
if (isset($this->attributes['sambaLogonToChgPwd'])) {
|
||||
$logonToChgPwd = _('Off');
|
||||
if ($this->attributes['sambaPwdHistoryLength'][0] == 2) $logonToChgPwd = _('On');
|
||||
$return['sambaDomain_logonToChgPwd'][0] = '<block><key>' . _('Logon for password change') . '</key><value>' . $logonToChgPwd . '</value></block>';
|
||||
$this->addPDFKeyValue($return, 'logonToChgPwd', _('Logon for password change'), $logonToChgPwd);
|
||||
}
|
||||
if (isset($this->attributes['sambaForceLogoff'])) {
|
||||
$forceLogoff = _('Off');
|
||||
if ($this->attributes['sambaForceLogoff'][0] == 0) $forceLogoff = _('On');
|
||||
$return['sambaDomain_forceLogoff'][0] = '<block><key>' . _('Disconnect users outside logon hours') . '</key><value>' . $forceLogoff . '</value></block>';
|
||||
$this->addPDFKeyValue($return, 'forceLogoff', _('Disconnect users outside logon hours'), $forceLogoff);
|
||||
}
|
||||
if (isset($this->attributes['sambaRefuseMachinePwdChange'])) {
|
||||
$refuseMachinePwdChange = _('Off');
|
||||
if ($this->attributes['sambaRefuseMachinePwdChange'][0] == 0) $refuseMachinePwdChange = _('On');
|
||||
$return['sambaDomain_refuseMachinePwdChange'][0] = '<block><key>' . _('Allow machine password changes') . '</key><value>' . $refuseMachinePwdChange . '</value></block>';
|
||||
$this->addPDFKeyValue($return, 'refuseMachinePwdChange', _('Allow machine password changes'), $refuseMachinePwdChange);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -553,7 +553,7 @@ class sambaGroupMapping extends baseModule {
|
|||
$members[] = $member;
|
||||
}
|
||||
}
|
||||
$return[get_class($this) . '_sambaSIDList'] = array('<block><key>' . _('Local members') . '</key><value>' . implode(', ', $members) . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'sambaSIDList', _('Local members'), implode(', ', $members));
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -1920,35 +1920,35 @@ class sambaSamAccount extends baseModule implements passwordService {
|
|||
if (!$mDial->getTsLogin()) {
|
||||
$tsAllowLogin = _('no');
|
||||
}
|
||||
$return['sambaSamAccount_tsAllowLogin'] = array('<block><key>' . _('Allow terminal server login') . '</key><value>' . $tsAllowLogin . '</value></block>');
|
||||
$return['sambaSamAccount_tsHomeDir'] = array('<block><key>' . _('Home directory') . ' (TS)</key><value>' . $mDial->ctx['CtxWFHomeDir'] . '</value></block>');
|
||||
$return['sambaSamAccount_tsHomeDrive'] = array('<block><key>' . _('Home drive') . ' (TS)</key><value>' . $mDial->ctx['CtxWFHomeDirDrive'] . '</value></block>');
|
||||
$return['sambaSamAccount_tsProfilePath'] = array('<block><key>' . _('Profile path') . ' (TS)</key><value>' . $mDial->ctx['CtxWFProfilePath'] . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'tsAllowLogin', _('Allow terminal server login'), $tsAllowLogin);
|
||||
$this->addPDFKeyValue($return, 'tsHomeDir', _('Home directory'). ' (TS)', $mDial->ctx['CtxWFHomeDir']);
|
||||
$this->addPDFKeyValue($return, 'tsHomeDrive', _('Home drive') . ' (TS)', $mDial->ctx['CtxWFHomeDirDrive']);
|
||||
$this->addPDFKeyValue($return, 'tsProfilePath', _('Profile path') . ' (TS)', $mDial->ctx['CtxWFProfilePath']);
|
||||
$tsInherit = _('yes');
|
||||
if (!$mDial->getInheritMode()) {
|
||||
$tsInherit = _('no');
|
||||
}
|
||||
$return['sambaSamAccount_tsInherit'] = array('<block><key>' . _('Inherit client startup configuration') . ' (TS)</key><value>' . $tsInherit . '</value></block>');
|
||||
$return['sambaSamAccount_tsInitialProgram'] = array('<block><key>' . _('Initial program') . ' (TS)</key><value>' . $mDial->ctx['CtxInitialProgram'] . '</value></block>');
|
||||
$return['sambaSamAccount_tsWorkDirectory'] = array('<block><key>' . _('Working directory') . ' (TS)</key><value>' . $mDial->ctx['CtxWorkDirectory'] . '</value></block>');
|
||||
$return['sambaSamAccount_tsConnectionLimit'] = array('<block><key>' . _('Connection time limit') . ' (TS)</key><value>' . $mDial->ctx['CtxMaxConnectionTime'] . '</value></block>');
|
||||
$return['sambaSamAccount_tsDisconnectionLimit'] = array('<block><key>' . _('Disconnection time limit') . ' (TS)</key><value>' . $mDial->ctx['CtxMaxDisconnectionTime'] . '</value></block>');
|
||||
$return['sambaSamAccount_tsIdleLimit'] = array('<block><key>' . _('Idle time limit') . ' (TS)</key><value>' . $mDial->ctx['CtxMaxIdleTime'] . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'tsInherit', _('Inherit client startup configuration') . ' (TS)', $tsInherit);
|
||||
$this->addPDFKeyValue($return, 'tsInitialProgram', _('Initial program') . ' (TS)', $mDial->ctx['CtxInitialProgram']);
|
||||
$this->addPDFKeyValue($return, 'tsWorkDirectory', _('Working directory') . ' (TS)', $mDial->ctx['CtxWorkDirectory']);
|
||||
$this->addPDFKeyValue($return, 'tsConnectionLimit', _('Connection time limit') . ' (TS)', $mDial->ctx['CtxMaxConnectionTime']);
|
||||
$this->addPDFKeyValue($return, 'tsDisconnectionLimit', _('Disconnection time limit') . ' (TS)', $mDial->ctx['CtxMaxDisconnectionTime']);
|
||||
$this->addPDFKeyValue($return, 'tsIdleLimit', _('Idle time limit') . ' (TS)', $mDial->ctx['CtxMaxIdleTime']);
|
||||
$tsConnectDrives = _('yes');
|
||||
if (!$mDial->getConnectClientDrives()) {
|
||||
$tsConnectDrives = _('no');
|
||||
}
|
||||
$return['sambaSamAccount_tsConnectDrives'] = array('<block><key>' . _('Connect client drives') . ' (TS)</key><value>' . $tsConnectDrives . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'tsConnectDrives', _('Connect client drives') . ' (TS)', $tsConnectDrives);
|
||||
$tsConnectPrinters = _('yes');
|
||||
if (!$mDial->getConnectClientPrinters()) {
|
||||
$tsConnectPrinters = _('no');
|
||||
}
|
||||
$return['sambaSamAccount_tsConnectPrinters'] = array('<block><key>' . _('Connect client printers') . ' (TS)</key><value>' . $tsConnectPrinters . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'tsConnectPrinters', _('Connect client printers') . ' (TS)', $tsConnectPrinters);
|
||||
$tsClientPrinterDefault = _('yes');
|
||||
if (!$mDial->getDefaultPrinter()) {
|
||||
$tsClientPrinterDefault = _('no');
|
||||
}
|
||||
$return['sambaSamAccount_tsClientPrinterDefault'] = array('<block><key>' . _('Client printer is default') . ' (TS)</key><value>' . $tsClientPrinterDefault . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'tsClientPrinterDefault', _('Client printer is default') . ' (TS)', $tsClientPrinterDefault);
|
||||
$shadowOptions = array(
|
||||
'0' => _("disabled"),
|
||||
'1' => _("input on, notify on"),
|
||||
|
@ -1959,7 +1959,7 @@ class sambaSamAccount extends baseModule implements passwordService {
|
|||
if (($mDial->getShadow() != null) && is_numeric($mDial->getShadow())) {
|
||||
$tsShadowing = $shadowOptions[$mDial->getShadow()];
|
||||
}
|
||||
$return['sambaSamAccount_tsShadowing'] = array('<block><key>' . _('Shadowing') . ' (TS)</key><value>' . $tsShadowing . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'tsShadowing', _('Shadowing') . ' (TS)', $tsShadowing);
|
||||
$brokenConnOptions = array(
|
||||
'0' => _("disconnect"),
|
||||
'1' => _("reset"));
|
||||
|
@ -1967,7 +1967,7 @@ class sambaSamAccount extends baseModule implements passwordService {
|
|||
if (($mDial->getBrokenConn() != null) && is_numeric($mDial->getBrokenConn())) {
|
||||
$tsBrokenConn = $brokenConnOptions[$mDial->getBrokenConn()];
|
||||
}
|
||||
$return['sambaSamAccount_tsBrokenConn'] = array('<block><key>' . _('On broken or timed out connection') . ' (TS)</key><value>' . $tsBrokenConn . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'tsBrokenConn', _('On broken or timed out connection') . ' (TS)', $tsBrokenConn);
|
||||
$reconnectOptions = array(
|
||||
'0' => _("from any client"),
|
||||
'1' => _("from previous client only"));
|
||||
|
@ -1975,7 +1975,7 @@ class sambaSamAccount extends baseModule implements passwordService {
|
|||
if (($mDial->getReConn() != null) && is_numeric($mDial->getReConn())) {
|
||||
$tsReconnect = $reconnectOptions[$mDial->getReConn()];
|
||||
}
|
||||
$return['sambaSamAccount_tsReconnect'] = array('<block><key>' . _('Reconnect if disconnected') . ' (TS)</key><value>' . $tsReconnect . '</value></block>');
|
||||
$this->addPDFKeyValue($return, 'tsReconnect', _('Reconnect if disconnected') . ' (TS)', $tsReconnect);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -496,9 +496,9 @@ class shadowAccount extends baseModule implements passwordService {
|
|||
if (isset($this->attributes['shadowExpire'][0])) {
|
||||
$shadowExpire = date('d. m. Y',$this->attributes['shadowExpire'][0]*24*3600);
|
||||
}
|
||||
$return = array('shadowAccount_shadowLastChange' => array('<block><key>' . _('Last password change') . '</key><value>' . $shadowLastChange . '</value></block>'),
|
||||
'shadowAccount_shadowExpire' => array('<block><key>' . _('Account expiration date') . '</key><value>' . $shadowExpire . '</value></block>'),
|
||||
);
|
||||
$return = array();
|
||||
$this->addPDFKeyValue($return, 'shadowLastChange', _('Last password change'), $shadowLastChange);
|
||||
$this->addPDFKeyValue($return, 'shadowExpire', _('Account expiration date'), $shadowExpire);
|
||||
$this->addSimplePDFField($return, 'shadowWarning', _('Password warning'));
|
||||
$this->addSimplePDFField($return, 'shadowInactive', _('Password expiration'));
|
||||
$this->addSimplePDFField($return, 'shadowMinAge', _('Minimum password age'), 'shadowMin');
|
||||
|
|
Loading…
Reference in New Issue