public function deltAction()
 {
     // Disable view
     $this->view->disable();
     // Get and process POST data
     if ($this->request->isPost() && !empty($id = (int) $this->request->getPost("id", "int"))) {
         $kriteria = Kriteria::findFirstByIdKriteria($id);
         if (empty($kriteria)) {
             $this->flashSession->error("Fatal Error! Unable to find the requested kriteria");
             return;
         }
         if (!empty(KuesionerChain::findFirstByIdKriteria($id))) {
             $result = $kriteria->setActive(false)->save();
         } else {
             $result = $kriteria->delete();
         }
         if (!$result) {
             $this->flashSession->error("Fatal Error! Unable to delete the requested kriteria record");
             foreach ($kriteria->getMessages() as $err) {
                 $this->flashSession->error($err);
             }
             return;
         }
         $this->flashSession->success("Record has been deleted successfully.");
     }
 }