X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=mobile%2Fclient_edit.php;h=fc22036975f92dcf3067e51ba76caa95e3c9880c;hb=2ccee198591bc2ad5d80b5e1076246449d9232c1;hp=2c553daf077aa89c3cb668799d917ac30889049e;hpb=ee49ee74b2a7d3c6daaa2d4bc6397b0c89e3099b;p=timetracker.git diff --git a/mobile/client_edit.php b/mobile/client_edit.php index 2c553daf..fc220369 100644 --- a/mobile/client_edit.php +++ b/mobile/client_edit.php @@ -32,7 +32,7 @@ import('ttClientHelper'); import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessAllowed('manage_clients') || !$user->isPluginEnabled('cl')) { header('Location: access_denied.php'); exit(); } @@ -70,6 +70,7 @@ if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->t $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'datakeys'=>array('id','name'),'layout'=>'H','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. @@ -112,6 +113,11 @@ if ($request->isPost()) { } else $err->add($i18n->getKey('error.client_exists')); } + + if ($request->getParameter('btn_delete')) { + header("Location: client_delete.php?id=$cl_id"); + exit(); + } } } // isPost