2 require_once('HTML/QuickForm/submit.php');
5 * HTML class for a submit type element
10 class MoodleQuickForm_cancel
extends MoodleQuickForm_submit
21 function MoodleQuickForm_cancel($elementName=null, $value=null, $attributes=null)
23 if ($elementName==null){
24 $elementName='cancel';
27 $value=get_string('cancel');
29 MoodleQuickForm_submit
::MoodleQuickForm_submit($elementName, $value, $attributes);
30 $this->updateAttributes(array('onclick'=>'skipClientValidation = true; return true;'));
32 function onQuickFormEvent($event, $arg, &$caller)
36 $className = get_class($this);
37 $this->$className($arg[0], $arg[1], $arg[2]);
38 $caller->_registerCancelButton($this->getName());
42 return parent
::onQuickFormEvent($event, $arg, $caller);
43 } // end func onQuickFormEvent
45 function getFrozenHtml(){
46 return HTML_QuickForm_submit
::getFrozenHtml();
50 return HTML_QuickForm_submit
::freeze();
53 } //end class MoodleQuickForm_cancel