mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 08:09:47 +02:00
MDL-16596 areafiles improvements
This commit is contained in:
parent
57a7e643c0
commit
4664b66c73
1 changed files with 9 additions and 1 deletions
|
@ -4,7 +4,7 @@ require_once('HTML/QuickForm/element.php');
|
||||||
|
|
||||||
class MoodleQuickForm_areafiles extends HTML_QuickForm_element {
|
class MoodleQuickForm_areafiles extends HTML_QuickForm_element {
|
||||||
protected $_helpbutton = '';
|
protected $_helpbutton = '';
|
||||||
protected $_options = array('subdirs'=>0, 'maxbytes'=>0);
|
protected $_options = array('subdirs'=>0, 'maxbytes'=>0, 'maxfiles'=>0);
|
||||||
|
|
||||||
function MoodleQuickForm_areafiles($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
|
function MoodleQuickForm_areafiles($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
|
@ -54,6 +54,14 @@ class MoodleQuickForm_areafiles extends HTML_QuickForm_element {
|
||||||
$this->_options['subdirs'] = $allow;
|
$this->_options['subdirs'] = $allow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getMaxfiles() {
|
||||||
|
return $this->_options['maxfiles'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function setMaxfiles($num) {
|
||||||
|
$this->_options['maxfiles'] = $num;
|
||||||
|
}
|
||||||
|
|
||||||
function setHelpButton($_helpbuttonargs, $function='_helpbutton') {
|
function setHelpButton($_helpbuttonargs, $function='_helpbutton') {
|
||||||
if (!is_array($_helpbuttonargs)) {
|
if (!is_array($_helpbuttonargs)) {
|
||||||
$_helpbuttonargs = array($_helpbuttonargs);
|
$_helpbuttonargs = array($_helpbuttonargs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue