MDL-24497, fixed maxbytes in user editing form
This commit is contained in:
@@ -1919,7 +1919,11 @@ class core_renderer extends renderer_base {
|
||||
} else {
|
||||
$size = get_max_upload_file_size();
|
||||
}
|
||||
$maxsize = get_string('maxfilesize', 'moodle', display_size($size));
|
||||
if ($size == -1) {
|
||||
$maxsize = get_string('maxfilesize', 'moodle', 'unlimited');
|
||||
} else {
|
||||
$maxsize = get_string('maxfilesize', 'moodle', display_size($size));
|
||||
}
|
||||
$html = <<<EOD
|
||||
<div class="filemanager-loading mdl-align" id='filepicker-loading-{$client_id}'>
|
||||
$icon_progress
|
||||
|
||||
+1
-1
@@ -246,7 +246,7 @@ function useredit_shared_definition(&$mform, $editoroptions = null) {
|
||||
$mform->addElement('checkbox', 'deletepicture', get_string('delete'));
|
||||
$mform->setDefault('deletepicture', 0);
|
||||
|
||||
$mform->addElement('filepicker', 'imagefile', get_string('newpicture'));
|
||||
$mform->addElement('filepicker', 'imagefile', get_string('newpicture'), '', array('maxbytes'=>get_max_upload_file_size($CFG->maxbytes)));
|
||||
$mform->addHelpButton('imagefile', 'newpicture');
|
||||
|
||||
$mform->addElement('text', 'imagealt', get_string('imagealt'), 'maxlength="100" size="30"');
|
||||
|
||||
Reference in New Issue
Block a user