1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-17 22:45:54 +02:00

MDL-19112 choosecoursefile group element - pass specified attrs to text element ; merged from 19_STABLE

This commit is contained in:
stronk7 2009-05-07 20:30:48 +00:00
parent fa5ac78bed
commit 3ea24f884a

@ -65,7 +65,11 @@ class MoodleQuickForm_choosecoursefile extends MoodleQuickForm_group
global $COURSE;
$this->_elements = array();
$this->_elements[0] =& MoodleQuickForm::createElement('text', 'value', '', array('size'=>'48'));
if (!is_array($this->getAttributes()) || !array_key_exists('size', $this->getAttributes())) {
$this->updateAttributes(array('size' => 48));
}
$this->_elements[0] =& MoodleQuickForm::createElement('text', 'value', '', $this->getAttributes());
$this->_elements[1] =& MoodleQuickForm::createElement('button', 'popup', get_string('chooseafile', 'resource') .' ...');
$button =& $this->_elements[1];
@ -91,6 +95,7 @@ class MoodleQuickForm_choosecoursefile extends MoodleQuickForm_group
$button->updateAttributes($buttonattributes);
}
/**
* Output a timestamp. Give it the name of the group.
*
@ -144,4 +149,4 @@ class MoodleQuickForm_choosecoursefile extends MoodleQuickForm_group
} // end func onQuickFormEvent
}
?>
?>