Verified Commit 42181356 authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: (Tasks) - Change hiddenAttribute to array for Referal

Change hiddenAttribute to array for Referal data.
Showing with 17 additions and 18 deletions
+17 -18
......@@ -307,8 +307,7 @@ attributetype ( 1.3.6.1.4.1.38414.62.1.56 NAME 'fdTasksGranularMailBCC'
attributetype ( 1.3.6.1.4.1.38414.62.1.26 NAME 'fdTasksGranularRef'
DESC 'Fusion Directory - Reference towards a CN (E.g Mail Template)'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
## Any tasks requiring to store DN (Such as lifeCycle). ##
......
......@@ -205,7 +205,7 @@ class tasks extends simplePlugin
"fdTasksGranularDN" => $dn,
"fdTasksGranularType" => $taskType,
// Verification as 'ref' could potentially not be present depending on the logic of the main task.
"fdTasksGranularRef" => !empty($attrs['ref']) ? $attrs['ref'] : null,
"fdTasksGranularRef" => !empty($attrs['ref'][$dn]) ? array_values($attrs['ref'][$dn]) : [],
];
break;
}
......@@ -218,7 +218,7 @@ class tasks extends simplePlugin
];
// Simply merged the common values and the custom ones depending on the attribute type passed.
$values['tasksGranular'] = array_merge($prepData['tasksGranular'], $defaultData['tasksGranular']);
print_r($values);
foreach ($values as $tab => $tabvalues) {
if (!isset($tabObject->by_object[$tab])) {
echo "Error tab does not contains attributes values" . PHP_EOL;
......
......@@ -25,15 +25,15 @@ class tasksGranular extends simplePlugin
static function plInfo (): array
{
return [
'plShortName' => _('Tasks Granular'),
'plDescription' => _('Granular tasks management allowing details reports'),
'plObjectClass' => ['fdTasksGranular'],
'plFilter' => '(objectClass=fdTasksGranular)',
'plPriority' => 41,
'plObjectType' => ['tasksGranular' => [
'name' => _('TasksGranular'),
'ou' => get_ou('tasksRDN'),
'icon' => 'geticon.php?context=applications&icon=tasks&size=16',
'plShortName' => _('Tasks Granular'),
'plDescription' => _('Granular tasks management allowing details reports'),
'plObjectClass' => ['fdTasksGranular'],
'plFilter' => '(objectClass=fdTasksGranular)',
'plPriority' => 41,
'plObjectType' => ['tasksGranular' => [
'name' => _('TasksGranular'),
'ou' => get_ou('tasksRDN'),
'icon' => 'geticon.php?context=applications&icon=tasks&size=16',
]],
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
];
......@@ -59,7 +59,7 @@ class tasksGranular extends simplePlugin
new HiddenAttribute('fdTasksGranularStatus', TRUE, '1', '', 'Status', 'Status of the task'),
new HiddenAttribute('fdTasksGranularMaster', TRUE, '', '', 'Master CN', 'Name of the Master task'),
new HiddenAttribute('fdTasksGranularType', TRUE, '', '', 'Type', 'Type of the task'),
new HiddenAttribute('fdTasksGranularRef', FALSE, '', '', 'Type', 'Reference towards a required CN (mail template E.g'),
new HiddenArrayAttribute('fdTasksGranularRef', FALSE, '', '', 'Type', 'Reference towards a required CN (mail template E.g'),
new DateTimeAttribute(
_('Schedule'), '',
'fdTasksGranularSchedule', FALSE
......@@ -71,11 +71,11 @@ class tasksGranular extends simplePlugin
),
// Below attributes are for tasks of type Mail
new MailAttribute(
_('Email'),
_('Email address to which messages will be sent'), 'fdTasksGranularMail', FALSE),
_('Email'),
_('Email address to which messages will be sent'), 'fdTasksGranularMail', FALSE),
new MailAttribute(
_('Email'),
_('Email address from which emails will be sent'), 'fdTasksGranularMailFrom', FALSE),
_('Email'),
_('Email address from which emails will be sent'), 'fdTasksGranularMailFrom', FALSE),
new MailAttribute(
_('Email'),
_('BCC Email address'), 'fdTasksGranularMailBCC', FALSE),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment