Permalink
Browse files

MDL-33026 set default author and license in drag-n-drop upload

  • Loading branch information...
1 parent 4631e39 commit 140669a9ddaf1e088ff8ef8efd25e8a2a793190d @marinaglancy marinaglancy committed May 28, 2012
Showing with 6 additions and 0 deletions.
  1. +4 −0 lib/form/dndupload.js
  2. +1 −0 lib/form/filemanager.js
  3. +1 −0 lib/form/filepicker.js
View
@@ -91,6 +91,7 @@ M.form_dndupload.init = function(Y, options) {
this.maxfiles = options.maxfiles;
this.maxbytes = options.maxbytes;
this.itemid = options.itemid;
+ this.author = options.author;
this.container = this.Y.one('#'+options.containerid);
if (options.filemanager) {
@@ -452,6 +453,9 @@ M.form_dndupload.init = function(Y, options) {
formdata.append('sesskey', M.cfg.sesskey);
formdata.append('repo_id', this.repositoryid);
formdata.append('itemid', this.itemid);
+ if (this.author) {
+ formdata.append('author', this.author);
+ }
if (this.filemanager) { // Filepickers do not have folders
formdata.append('savepath', this.filemanager.currentpath);
}
View
@@ -963,6 +963,7 @@ M.form_filemanager.init = function(Y, options) {
filemanager: manager,
acceptedtypes: options.accepted_types,
clientid: options.client_id,
+ author: options.author,
maxfiles: options.maxfiles,
maxbytes: options.maxbytes,
itemid: options.itemid,
View
@@ -47,6 +47,7 @@ M.form_filepicker.init = function(Y, options) {
var dndoptions = {
clientid: options.client_id,
acceptedtypes: options.accepted_types,
+ author: options.author,
maxfiles: -1,
maxbytes: options.maxbytes,
itemid: options.itemid,

0 comments on commit 140669a

Please sign in to comment.