From: Marina Glancy Date: Wed, 4 Jul 2012 02:06:02 +0000 (+0800) Subject: MDL-33444 Upload repository can specify custom label for filepicker X-Git-Tag: v2.4.0-beta~1081^2 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=6133c2ea211d33cddd77498fb684f7769dbe6af0 MDL-33444 Upload repository can specify custom label for filepicker --- diff --git a/repository/filepicker.js b/repository/filepicker.js index 93e44904346..d23f3615b3f 100644 --- a/repository/filepicker.js +++ b/repository/filepicker.js @@ -1625,6 +1625,9 @@ M.core_filepicker.init = function(Y, options) { }); content.one('form').set('id', id); content.one('.fp-file input').set('name', 'repo_upload_file'); + if (data.upload.label && content.one('.fp-file label')) { + content.one('.fp-file label').setContent(data.upload.label); + } content.one('.fp-saveas input').set('name', 'title'); content.one('.fp-setauthor input').setAttrs({name:'author', value:this.options.author}); content.one('.fp-setlicense select').set('name', 'license');