/** * What to do when starting the form * * @param MoodleQuickForm $form */ function startForm(&$form) { $this->_reqHTML = $form->getReqHTML(); $this->_elementTemplates = str_replace('{req}', $this->_reqHTML, $this->_elementTemplates); $this->_advancedHTML = $form->getAdvancedHTML(); $this->_showAdvanced = $form->getShowAdvanced(); parent::startForm($form); if ($form->isFrozen()) { $this->_formTemplate = "\n<div class=\"mform frozen\">\n{content}\n</div>"; } else { $this->_hiddenHtml .= $form->_pageparams; } }
/** * What to do when starting the form * * @param MoodleQuickForm $form reference of the form */ function startForm(&$form) { global $PAGE; $this->_reqHTML = $form->getReqHTML(); $this->_elementTemplates = str_replace('{req}', $this->_reqHTML, $this->_elementTemplates); $this->_advancedHTML = $form->getAdvancedHTML(); $this->_showAdvanced = $form->getShowAdvanced(); parent::startForm($form); if ($form->isFrozen()) { $this->_formTemplate = "\n<div class=\"mform frozen\">\n{content}\n</div>"; } else { $this->_formTemplate = "\n<form{attributes}>\n\t<div style=\"display: none;\">{hidden}</div>\n{content}\n</form>"; $this->_hiddenHtml .= $form->_pageparams; } $PAGE->requires->yui_module('moodle-core-formchangechecker', 'M.core_formchangechecker.init', array(array('formid' => $form->getAttribute('id')))); $PAGE->requires->string_for_js('changesmadereallygoaway', 'moodle'); }
/** * What to do when starting the form * * @param MoodleQuickForm $form */ function startForm(&$form) { $this->_reqHTML = $form->getReqHTML(); $this->_elementTemplates = str_replace('{req}', $this->_reqHTML, $this->_elementTemplates); $this->_advancedHTML = $form->getAdvancedHTML(); $this->_showAdvanced = $form->getShowAdvanced(); parent::startForm($form); }