/** * Add a specific page to wizard or each page one by one * * @param array $page a single Wizard page definition * @return void * @access public * @since 2.1.0 */ function addPage($page) { $className = $page['@']['class']; $pageName = $page['@']['name']; $qfcPage =& new $className($pageName); parent::addPage($qfcPage); // adds additional action foreach ($page as $action => $attr) { if ($action == '#' || $action == '@') { continue; } $qfcPage->addAction($action, new $attr['@']['class']()); } // adds common action on each page $this->addAction($pageName, new HTML_QuickForm_Action_Direct()); }
// } else { // // Redirect to roles assignment // redirect($CFG->wwwroot."/$CFG->admin/roles/assign.php?contextid=$context->id"); // } } // if (empty($course)) } else { // no data has been taken from session (wizard) print_error('coursenotcreated'); } redirect($CFG->wwwroot . "/course/view.php?id={$course->id}"); } } //class ActionProcess $wizard = new HTML_QuickForm_Controller('courseWizard', true); $wizard->addPage(new NewCourseBasic('page1')); $wizard->addPage(new NewCourseTechnology('page2')); $wizard->addPage(new NewCourseSyncAsync('page3')); // read values from the previous step $wizard->setDefaults($wizard->exportValues()); $wizard->addAction('display', new ActionDisplay()); $wizard->addAction('process', new ActionProcess()); // generate heading $site = get_site(); $streditcoursesettings = get_string("editcoursesettings"); $straddnewcourse = get_string("addnewcourse"); $stradministration = get_string("administration"); $strcategories = get_string("categories"); $navlinks = array(); $navlinks[] = array('name' => $stradministration, 'link' => "{$CFG->wwwroot}/{$CFG->admin}/index.php", 'type' => 'misc'); $navlinks[] = array('name' => $strcategories, 'link' => 'index.php', 'type' => 'misc');
<input type="hidden" name="os0" value=""> <input type="hidden" name="on1" value="Reference No: <?php echo 'M09-' . $last_id; ?> "> <input type="hidden" name="os1" value=""> <br> <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynow_LG.gif"> </form> <?php echo htmlentities(T_("Note:")) . " " . htmlentities(T_("Your registration is only valid as soon as we received your payment.")) . "<br>\n"; echo htmlentities(T_("You have to pay within 2 weeks of completing your registration (this is now), otherwise the system will delete your registration automatically")) . "<br>\n"; session_destroy(); } } // Neue Formular-Objekte mit eindeutigem Namen ableiten $seite1 = new Form_Personal('seite1'); $seite2 = new Form_Motivation('seite2'); $seite4 = new Form_Bankdaten('seite4'); // Neues Controller-Objekt ableiten $controller = new HTML_QuickForm_Controller('mnformular', true); // Formularseiten hinzufuegen $controller->addPage($seite1); $controller->addPage($seite2); $controller->addPage($seite4); // add the actions $controller->addAction('display', new ActionDisplay()); $controller->addAction('process', new ActionProcess()); // Controller ausfuehren $controller->run(); $mdb2->disconnect();
// $Id: signup.php,v 1.56 2007/08/17 19:09:21 nicolasconnault Exp $ require_once '../config.php'; // kowy - use new wizard instead //require_once('signup_form.php'); require_once 'signup_form_su.php'; if (empty($CFG->registerauth)) { error("Sorry, you may not use this page."); } $authplugin = get_auth_plugin($CFG->registerauth); if (!$authplugin->can_signup()) { error("Sorry, you may not use this page."); } //HTTPS is potentially required in this page httpsrequired(); $mform_signup = new HTML_QuickForm_Controller('newuserWizard', true); $mform_signup->addPage(new WizardStepOne()); $mform_signup->addPage(new WizardStepTwo()); $mform_signup->addPage(new WizardStepThree()); $mform_signup->addPage(new WizardStepFour()); $mform_signup->addPage(new WizardStepFive()); $mform_signup->addPage(new WizardStepSix()); $mform_signup->addPage(new WizardStepSeven()); // read values from the previous step $mform_signup->setDefaults($mform_signup->exportValues()); $mform_signup->addAction('display', new ActionDisplay()); $mform_signup->addAction('process', new ActionProcess()); // if ($mform_signup->is_cancelled()) { // redirect($CFG->httpswwwroot.'/login/index.php'); // // } else if ($user = $mform_signup->get_data()) { // $user->confirmed = 0;