- <?php
- /* vim: set number autoindent tabstop=2 shiftwidth=2 softtabstop=2: */
-
- /**
- * Next action
- *
- * PHP versions 4 and 5
- *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt. If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
- *
- * @category HTML
- * @package HTML_QuickForm_Wizard
- * @author Fabio Ambrosanio <fabio@ambrosanio.com>
- * @license http://www.php.net/license/3_01.txt PHP
- * @version @package_version@
- *
- * $Id: submit.php,v 1.1 2007/02/18 18:36:11 fabamb Exp $
- */
-
- require_once 'HTML/QuickForm/Action/Next.php';
-
- /**
- * This class implements "submit" action that is to validate and save form's data and stay at the current pages
- *
- */
- class HTML_QuickForm_Wizard_submit extends HTML_QuickForm_Action_Next
- {
- function perform(&$page, $actionName)
- {
- // save the form values and validation status to the session
- $page->isFormBuilt() or $page->buildForm();
- $pageName = $page->getAttribute('id');
- $data =& $page->controller->container();
- $data['values'][$pageName] = $page->exportValues();
- if (PEAR::isError($valid = $page->validate())) {
- return $valid;
- }
- $data['valid'][$pageName] = $valid;
-
- return $page->handle('display');
- }
- }
- ?>