Fixed file dropper triggering form submit

This commit is contained in:
Marcin Kurczewski 2014-10-26 00:22:26 +02:00
parent fd0e698413
commit e983e72013

View file

@ -10,7 +10,7 @@ App.Controls.FileDropper = function($fileInput) {
setNames: false, setNames: false,
}; };
var $dropDiv = jQuery('<button class="file-handler"></button>'); var $dropDiv = jQuery('<button type="button" class="file-handler"></button>');
var allowMultiple = $fileInput.attr('multiple'); var allowMultiple = $fileInput.attr('multiple');
$dropDiv.html((allowMultiple ? 'Drop files here!' : 'Drop file here!') + '<br/>Or just click on this box.'); $dropDiv.html((allowMultiple ? 'Drop files here!' : 'Drop file here!') + '<br/>Or just click on this box.');
$dropDiv.insertBefore($fileInput); $dropDiv.insertBefore($fileInput);