<?php } ?> </div> <?php foreach ($tables as $table_name => $table_data) { if ($table_name == PredefinedLists::UNITY) { include_partial('predefinedUnities', array('table_name' => PredefinedLists::UNITY, 'table_data' => $table_data, 'table_title' => PredefinedLists::getTableTitle(PredefinedLists::UNITY))); } else { if ($table_name == PredefinedLists::COMPUTER_OS) { include_partial('predefinedOs', array('table_name' => PredefinedLists::COMPUTER_OS, 'table_data' => $table_data, 'table_title' => PredefinedLists::getTableTitle(PredefinedLists::COMPUTER_OS))); } else { include_partial('predefinedList', array('table_name' => $table_name, 'table_data' => $table_data, 'table_title' => PredefinedLists::getTableTitle($table_name))); } } } ?> </div> <!-- ---------------------------------- SYSTEM PARAMETERS ------------------------------------------- --> <div id="system"> <?php echo $form->renderGlobalErrors(); ?> <h1><?php echo __('System Parameters');
public function executeUpdateOrders(sfWebRequest $request) { //Check that the HTTP method is 'POST': $this->forward404Unless($request->isMethod(sfRequest::POST)); //Get the POST parameters: $update_order = $request->getParameter('update_order', array()); $update_short_designation = $request->getParameter('update_short_designation', array()); $update_id = $request->getParameter('update_id', array()); $table = $request->getParameter('table'); //Update the orders and the short designations: PredefinedLists::update($update_id, $update_short_designation, $update_order, $table); //Re-get the table that have been updated $data = PredefinedLists::getData(array($table => null)); $this->updated_table = $data[$table]; if ($table == PredefinedLists::UNITY) { $this->setTemplate('updateUnities', 'configuration'); } else { if ($table == PredefinedLists::COMPUTER_OS) { $this->setTemplate('updateOs', 'configuration'); } else { $this->table_name = $table; $this->setTemplate('updateLists', 'configuration'); } } }