mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
checking in files for some new custom elements. And added a default help button to the format drop down box.
This commit is contained in:
parent
02059f4678
commit
c65795d341
3 changed files with 107 additions and 2 deletions
35
lib/form/submit.php
Normal file
35
lib/form/submit.php
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
require_once('HTML/QuickForm/submit.php');
|
||||
|
||||
/**
|
||||
* HTML class for a submit type element
|
||||
*
|
||||
* @author Jamie Pratt
|
||||
* @access public
|
||||
*/
|
||||
class MoodleQuickForm_submit extends HTML_QuickForm_submit
|
||||
{
|
||||
// {{{ constructor
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
* @param string Input field name attribute
|
||||
* @param string Input field value
|
||||
* @param mixed Either a typical HTML attribute string or an associative array
|
||||
* @since 1.0
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function MoodleQuickForm_submit($elementName=null, $value=null, $attributes=null)
|
||||
{
|
||||
HTML_QuickForm_submit::HTML_QuickForm_submit($elementName, $value, $attributes);
|
||||
if ($elementName='cancel'){
|
||||
//bypass form validation js :
|
||||
$this->updateAttributes(array('onclick'=>'this.form.submit();'));
|
||||
}
|
||||
} //end constructor
|
||||
|
||||
} //end class HTML_QuickForm_submit
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue