mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Disable UploadField init on readonly or disabled fields
This commit is contained in:
parent
783de154b2
commit
db1854b5fb
@ -30,6 +30,8 @@
|
|||||||
Config: null,
|
Config: null,
|
||||||
|
|
||||||
onmatch: function() {
|
onmatch: function() {
|
||||||
|
if(this.is('.readonly,.disabled')) return;
|
||||||
|
|
||||||
var fileInput = this.find('input');
|
var fileInput = this.find('input');
|
||||||
var dropZone = this.find('.ss-uploadfield-dropzone');
|
var dropZone = this.find('.ss-uploadfield-dropzone');
|
||||||
var config = $.parseJSON(fileInput.data('config').replace(/'/g,'"'));
|
var config = $.parseJSON(fileInput.data('config').replace(/'/g,'"'));
|
||||||
|
Loading…
Reference in New Issue
Block a user