choosecoursefileorimsrepo MDL-19332 pass specified attrs to text element
This commit is contained in:
@@ -63,7 +63,11 @@ class MoodleQuickForm_choosecoursefileorimsrepo extends MoodleQuickForm_group
|
||||
global $CFG, $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];
|
||||
|
||||
Reference in New Issue
Block a user