X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/ee49ee74b2a7d3c6daaa2d4bc6397b0c89e3099b..aad5111d2e9f3329dc1002e897dd910a60946d6c:/mobile/task_edit.php diff --git a/mobile/task_edit.php b/mobile/task_edit.php index fd5b35bb..e2dcc990 100644 --- a/mobile/task_edit.php +++ b/mobile/task_edit.php @@ -32,7 +32,7 @@ import('ttTeamHelper'); import('ttTaskHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) { header('Location: access_denied.php'); exit(); } @@ -65,6 +65,8 @@ $form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','layout'=>'H','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_projects)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save'))); $form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->getKey('button.copy'))); +$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete'))); + if ($request->isPost()) { // Validate user input. @@ -105,6 +107,11 @@ if ($request->isPost()) { } else $err->add($i18n->getKey('error.task_exists')); } + + if ($request->getParameter('btn_delete')) { + header("Location: task_delete.php?id=$cl_task_id"); + exit(); + } } } // isPost