From 7760c0f62e315c970bbe2c889dd759093692359c Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 22 Apr 2016 17:43:19 +0200 Subject: [PATCH] DatalistentryController: remove obsolete controller --- .../controllers/DatalistentryController.php | 66 ------------------- 1 file changed, 66 deletions(-) delete mode 100644 application/controllers/DatalistentryController.php diff --git a/application/controllers/DatalistentryController.php b/application/controllers/DatalistentryController.php deleted file mode 100644 index 2cf6c2be..00000000 --- a/application/controllers/DatalistentryController.php +++ /dev/null @@ -1,66 +0,0 @@ -indexAction(); - } - - public function editAction() - { - $this->indexAction(true); - } - - public function indexAction($edit = false) - { - $request = $this->getRequest(); - - $listId = $this->params->get('list_id'); - $this->view->lastId = $listId; - - if ($this->params->get('list_id') && $entryName = $this->params->get('entry_name')) { - $edit = true; - } - - if ($edit) { - $this->view->title = $this->translate('Edit entry'); - $this->getTabs()->add('editentry', array( - 'url' => 'director/datalistentry/edit' . '?list_id=' . $listId . '&entry_name=' . $entryName, - 'label' => $this->view->title, - ))->activate('editentry'); - } else { - $this->view->title = $this->translate('Add entry'); - $this->getTabs()->add('addlistentry', array( - 'url' => 'director/datalistentry/add' . '?list_id=' . $listId, - 'label' => $this->view->title, - ))->activate('addlistentry'); - } - - $form = $this->view->form = $this->loadForm('directorDatalistentry') - ->setListId($listId) - ->setSuccessUrl('director/datalistentry' . '?list_id=' . $listId) - ->setDb($this->db()); - - if ($request->isPost()) { - $listId = $request->getParam('list_id'); - $entryName = $request->getParam('entry_name'); - } - - if ($edit) { - $form->loadObject(array('list_id' => $listId, 'entry_name' => $entryName)); - if ($el = $form->getElement('entry_name')) { - // TODO: Doesn't work without setup - $el->setAttribs(array('readonly' => true)); - } - } - - $form->handleRequest(); - - $this->render('object/form', null, true); - } -}