projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull merge.
[yaffs-website]
/
web
/
core
/
modules
/
file
/
src
/
Element
/
ManagedFile.php
diff --git
a/web/core/modules/file/src/Element/ManagedFile.php
b/web/core/modules/file/src/Element/ManagedFile.php
index 6f01ee552e979a3539b8e64acb8045c1d4ed5972..95798c6734de0c3f48efe759d61cc382392a3212 100644
(file)
--- a/
web/core/modules/file/src/Element/ManagedFile.php
+++ b/
web/core/modules/file/src/Element/ManagedFile.php
@@
-299,6
+299,10
@@
class ManagedFile extends FormElement {
// Add the upload progress callback.
$element['upload_button']['#ajax']['progress']['url'] = Url::fromRoute('file.ajax_progress', ['key' => $upload_progress_key]);
// Add the upload progress callback.
$element['upload_button']['#ajax']['progress']['url'] = Url::fromRoute('file.ajax_progress', ['key' => $upload_progress_key]);
+
+ // Set a custom submit event so we can modify the upload progress
+ // identifier element before the form gets submitted.
+ $element['upload_button']['#ajax']['event'] = 'fileUpload';
}
// The file upload field itself.
}
// The file upload field itself.