diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index d30af64248..1d87123c74 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -768,7 +768,7 @@ class infolog_ui // Some processing to add values in for links and cats $multi_action = $values['nm']['multi_action']; // Action has an additional action - add / delete, etc. Buttons named _action[action_name] - if(in_array($multi_action, array('link', 'responsible'))) + if(in_array($multi_action, array('link', 'responsible', 'startdate', 'enddate'))) { // eTemplate ignores the _popup namespace, but et2 doesn't if($values[$multi_action.'_popup']) @@ -1181,6 +1181,16 @@ class infolog_ui 'cat' => Etemplate\Widget\Nextmatch::category_action( 'infolog',$group,'Change category','cat_' ), + 'startdate' => array( + 'caption' => 'Start date', + 'group' => $group, + 'nm_action' => 'open_popup', + ), + 'enddate' => array( + 'caption' => 'End date', + 'group' => $group, + 'nm_action' => 'open_popup', + ), 'responsible' => array( 'caption' => 'Delegation', 'group' => $group, @@ -1567,6 +1577,21 @@ class infolog_ui $failed++; } break; + case 'startdate': + case 'enddate': + $field = $action == 'startdate' ? 'info_startdate' : 'info_enddate'; + list($ok, $date) = explode('_', $settings, 2); + $entry[$field] = $date ? Api\DateTime::to($date, 'ts') : null; + $action_msg = lang('changed'); + if($this->bo->write($entry, true,true,true,$skip_notifications)) + { + $success++; + } + else + { + $failed++; + } + break; } } return $failed == 0; diff --git a/infolog/templates/default/index.xet b/infolog/templates/default/index.xet index 092022c2cd..c64a7a1ba1 100644 --- a/infolog/templates/default/index.xet +++ b/infolog/templates/default/index.xet @@ -194,6 +194,28 @@ + + + + + + +