From ff768bc57eea49aa008835f4f9ea463325dc9ee4 Mon Sep 17 00:00:00 2001 From: jamiesensei Date: Thu, 4 Jan 2007 11:30:37 +0000 Subject: [PATCH] small fix to button --- lib/form/choosecoursefile.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/form/choosecoursefile.php b/lib/form/choosecoursefile.php index 7315c04536..fb62b8ff83 100644 --- a/lib/form/choosecoursefile.php +++ b/lib/form/choosecoursefile.php @@ -68,7 +68,7 @@ class MoodleQuickForm_choosecoursefile extends MoodleQuickForm_group $this->_elements[0] =& MoodleQuickForm::createElement('text', 'value', ''); $this->_elements[1] =& MoodleQuickForm::createElement('button', 'popup', get_string('chooseafile', 'resource') .' ...'); - $button=$this->_elements[1]; + $button =& $this->_elements[1]; if ($this->_options['courseid']!==null){ $courseid=$this->_options['courseid']; @@ -86,6 +86,7 @@ class MoodleQuickForm_choosecoursefile extends MoodleQuickForm_group $buttonattributes = array('title'=>get_string("chooseafile", "resource"), 'onclick'=>"return openpopup('$url', '".$button->getName()."', '$options', $fullscreen);"); + $button->updateAttributes($buttonattributes); } /** @@ -139,5 +140,6 @@ class MoodleQuickForm_choosecoursefile extends MoodleQuickForm_group return parent::onQuickFormEvent($event, $arg, $caller); } // end func onQuickFormEvent + } ?> \ No newline at end of file -- 2.39.5