diff --git a/contrib/openldap/core-fd.schema b/contrib/openldap/core-fd.schema index da9453bad3c0a1cc1ae722f28fd9c10f1d793793..a90e631490b91308ce5ac679bd67cf49304cf09a 100644 --- a/contrib/openldap/core-fd.schema +++ b/contrib/openldap/core-fd.schema @@ -372,6 +372,26 @@ attributetype ( 1.3.6.1.4.1.38414.62.1.50 NAME 'fdPluginManagerSupportContractUr SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) +##### Tasks Granular Part 2 ##### + +attributetype ( 1.3.6.1.4.1.38414.62.1.52 NAME 'fdTasksRepeatable' + DESC 'Allow a given task to be repeatable' + EQUALITY booleanMatch + SUBSTR caseIgnoreSubstringsMatch + SYNTAX '1.3.6.1.4.1.1466.115.121.1.7') + +attributetype ( 1.3.6.1.4.1.38414.62.1.53 NAME 'fdTasksUpdatable' + DESC 'Allow a given task to be updatable' + EQUALITY booleanMatch + SUBSTR caseIgnoreSubstringsMatch + SYNTAX '1.3.6.1.4.1.1466.115.121.1.7') + +attributetype ( 1.3.6.1.4.1.38414.62.1.54 NAME 'fdTasksRepeatableSchedule' + DESC 'Set the repetition of the tasks via a set attribute' + EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch + SYNTAX '1.3.6.1.4.1.1466.115.121.1.15') + ##### Classes ##### ### old gosa ObjectClass ### @@ -441,7 +461,7 @@ objectclass ( 1.3.6.1.4.1.38414.62.2.5 NAME 'fdMailTemplateConf' objectclass (1.3.6.1.4.1.38414.62.2.6 NAME 'fdTasks' DESC 'FusionDirectory - Tasks objects' MUST ( cn $ fdTasksStatus $ fdTasksCreationDate ) - MAY ( fdTasksScheduleDate $ fdTasksEndDate) ) + MAY ( fdTasksScheduleDate $ fdTasksEndDate $ fdTasksRepeatableSchedule $ fdTasksUpdatable $ fdTasksRepeatable ) ) objectclass (1.3.6.1.4.1.38414.62.2.7 NAME 'fdTasksMail' DESC 'FusionDirectory - Tasks objects Mail' diff --git a/plugins/configuration/tasks/class_tasks.inc b/plugins/configuration/tasks/class_tasks.inc index 53ffe01da9d28b7676a73785954fa33972e63602..78e2c8553a06d503a52be74aba9af6e27284dc12 100644 --- a/plugins/configuration/tasks/class_tasks.inc +++ b/plugins/configuration/tasks/class_tasks.inc @@ -45,7 +45,7 @@ class tasks extends simplePlugin return [ // Attributes are grouped by section 'tasks' => [ - 'name' => _('Tasks Generic | Saving will create un-modifiable subtasks'), + 'name' => _('Tasks Generic'), 'attrs' => [ new StringAttribute( _('Task Name'), _('Name for this task'), @@ -69,6 +69,23 @@ class tasks extends simplePlugin ), ] ], + 'taskSetting' => [ + 'name' => _('Advanced settings'), + 'attrs' => [ + new BooleanAttribute( + _('Only with new members'), _('Allows creation of sub-tasks for "NEW MEMBERS" only. (Case of Dynamic Group)'), + 'fdTasksUpdatable', FALSE, TRUE + ), + new BooleanAttribute( + _('Repeatable Task'), _('Set the task to be repeatable.'), + 'fdTasksRepeatable', FALSE + ), + new SelectAttribute( + _('Repeatable Schedule'), _('Select the desired schedule.'), + 'fdTasksRepeatableSchedule', FALSE, ['Yearly', 'Monthly', 'Daily', 'Hourly'], 'Daily' + ), + ] + ], ]; } @@ -78,6 +95,16 @@ class tasks extends simplePlugin global $config; parent::__construct($dn, $object, $parent, $mainTab); + $this->attributesAccess['fdTasksRepeatable']->setManagedAttributes( + [ + 'disable' => [ + FALSE => [ + 'fdTasksRepeatableSchedule', + ] + ] + ] + ); + $this->attributesAccess['fdSubTasksActivation']->setInLdap(FALSE); }