Just add the below to multiupload.js and you are ready to go.
// should probably be in i18n
wgAddMoreName = 'Add next file'; // en
//wgAddMoreName = 'Dodaj następny plik'; // pl
/**
* Enable showing one file at first and add more
*
* This will hide all files input but the first one
* and will add an add more button.
*
* @note $wgMaxUploadFiles param sets maximum number of files uploaded at once
*/
function wgUploadHideSetup() {
var eRows;
try {
eRows = document.getElementById( 'mw-htmlform-source' ).getElementsByTagName('tr');
} catch (e) {
return;
}
if( eRows ) {
//
// get rows array
//
var arrRows = new Array();
var iLastRow;
var oRow = new Object();
for (var i=0; i<eRows.length; i++) {
var e = eRows[i];
if (e.className.search(/(^| )mw-htmlform-field-UploadSourceField( |$)/)>=0) {
oRow.rIn = e;
iLastRow = i;
} else if (e.className.search(/(^| )mw-htmlform-field-HTMLTextField( |$)/)>=0) {
oRow.rOut = e;
iLastRow = i;
arrRows.push(oRow);
oRow = new Object();
}
}
if (arrRows.length <= 0)
{
if (typeof(console) != 'undefined' && typeof(console.log) == 'function')
{
console.log ('wgUploadHideSetup: no form fields found - class name changed?');
}
return;
}
//
// hide all but first
//
var strRowNormalDisplay = arrRows[0].rIn.style.display;
for (var i=1; i<arrRows.length; i++) {
arrRows[i].rIn.style.display = 'none';
arrRows[i].rOut.style.display = 'none';
}
//
// add button
//
// cells
var nel = document.createElement('tr');
var nelTd = document.createElement('td');
nel.appendChild(nelTd);
nelTd = document.createElement('td');
nel.appendChild(nelTd);
// the button
var nelInp = document.createElement('input');
nelInp.setAttribute('type', 'button');
var lastVisible = 0;
nelInp.onclick = function () {
if (lastVisible<arrRows.length-1) {
lastVisible++;
arrRows[lastVisible].rIn.style.display = strRowNormalDisplay;
arrRows[lastVisible].rOut.style.display = strRowNormalDisplay;
}
if (lastVisible>=arrRows.length-1) {
this.style.display = 'none';
}
}
nelInp.value = wgAddMoreName;
nelTd.appendChild(nelInp);
if (iLastRow == eRows.length-1) {
eRows[iLastRow].parentNode.appendChild(nel);
} else {
eRows[iLastRow+1].parentNode.insertBefore(nel, eRows[iLastRow+1]);
}
}
}
addOnloadHook( wgUploadHideSetup );
Regards,