Added .gitignore
[moodle-linuxchix.git] / lib / form / submitlink.php
blob9b5c6b015cde3ed8eb4dbe625506075490041157
1 <?php
2 global $CFG;
3 require_once("$CFG->libdir/form/submit.php");
4 class MoodleQuickForm_submitlink extends MoodleQuickForm_submit {
5 var $_js;
6 var $_onclick;
8 function toHtml() {
9 $text = $this->_attributes['value'];
10 $onmouseover = "window.status=\'" . $text . "\';";
11 $onmouseout = "window.status=\'\';";
13 return "<noscript>" . parent::toHtml() . '</noscript><script type="text/javascript">' . $this->_js . "\n"
14 . 'document.write(\'<a href="#" onclick="' . $this->_onclick . '" onmouseover="' . $onmouseover . '" onmouseout="' . $onmouseout . '">'
15 . $text . "</a>');\n</script>";