From f66ab8dae2f3d0418759f81a3a64dc9517a62449 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:17:31 +0200 Subject: Adding upstream version 1.10.2. Signed-off-by: Daniel Baumann --- application/controllers/DatafieldController.php | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 application/controllers/DatafieldController.php (limited to 'application/controllers/DatafieldController.php') diff --git a/application/controllers/DatafieldController.php b/application/controllers/DatafieldController.php new file mode 100644 index 0000000..afad317 --- /dev/null +++ b/application/controllers/DatafieldController.php @@ -0,0 +1,40 @@ +indexAction(); + } + + public function editAction() + { + $this->indexAction(); + } + + public function indexAction() + { + $form = DirectorDatafieldForm::load() + ->setDb($this->db()); + + if ($id = $this->params->get('id')) { + $form->loadObject((int) $id); + $this->addTitle( + $this->translate('Modify %s'), + $form->getObject()->varname + ); + $this->addSingleTab($this->translate('Edit a Field')); + } else { + $this->addTitle($this->translate('Add a new Data Field')); + $this->addSingleTab($this->translate('New Field')); + } + + $form->handleRequest(); + $this->content()->add($form); + } +} -- cgit v1.2.3