Source of file Form.php
Size: 0,924 Bytes - Last Modified: 2021-12-24T06:34:06+00:00
/var/www/docs.ssmods.com/process/src/code/controllers/Form.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445 | <?php class Cleopas_Controllers_Form extends Page_Controller { private static $allowed_actions = array( 'submitForm', 'formModals', ); public function getJsonTemplateFile() { global $project; // TODO: remove global dependency return BASE_PATH . '/' . $project . '/json/Form.json'; } protected function getTemplateList($action = null) { yield 'FormPage'; } public function Link($action = null) { return '/form'; } public function index() { $this->redirect('/', 404); } public function submitForm() { $params = $this->request->allParams(); if ($this->request->isAjax() || (array_key_exists('form_name', $params) && $this->hasFormWidget($params['form_name']))) { parent::submitForm(); } else { $this->index(); } } } |