Skip to content
Permalink
Browse files

MDL-19112 choosecoursefile group element - pass specified attrs to te…

…xt element ; merged from 19_STABLE
  • Loading branch information...
stronk7
stronk7 committed May 7, 2009
1 parent fa5ac78 commit 3ea24f884aa6296cc8c44a5eb153e1a083f1fb14
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/form/choosecoursefile.php
@@ -65,7 +65,11 @@ function _createElements() {
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 @@ function _createElements() {
$button->updateAttributes($buttonattributes);
}
/**
* Output a timestamp. Give it the name of the group.
*
@@ -144,4 +149,4 @@ function onQuickFormEvent($event, $arg, &$caller)
} // end func onQuickFormEvent
}
?>
?>

0 comments on commit 3ea24f8

Please sign in to comment.
You can’t perform that action at this time.