2 require_once("HTML/QuickForm/submit.php");
5 * HTML class for a submit type element
7 * @author Adam Daniel <adaniel1@eesus.jnj.com>
8 * @author Bertrand Mansion <bmansion@mamasam.com>
13 class MoodleQuickForm_submit
extends HTML_QuickForm_submit
{
15 * Called by HTML_QuickForm whenever form event is made on this element
17 * @param string $event Name of event
18 * @param mixed $arg event arguments
19 * @param object $caller calling object
24 function onQuickFormEvent($event, $arg, &$caller)
28 parent
::onQuickFormEvent($event, $arg, $caller);
29 if ($caller->isNoSubmitButton($arg[0])){
30 //need this to bypass client validation
31 //for buttons that submit but do not process the
33 $onClick = $this->getAttribute('onclick');
34 $skip = 'skipClientValidation = true;';
35 $onClick = ($onClick !== null)?
$skip.' '.$onClick:$skip;
36 $this->updateAttributes(array('onclick'=>$onClick));
41 return parent
::onQuickFormEvent($event, $arg, $caller);
43 } // end func onQuickFormEvent
45 * Slightly different container template when frozen. Don't want to display a submit
46 * button if the form is frozen.
50 function getElementTemplateType(){
51 if ($this->_flagFrozen
){
59 $this->_flagFrozen
= true;