mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4595 from kinglozzer/pulls/uploadfield-file-link-fix
FIX: Editing existing file links in HtmlEditorField was broken
This commit is contained in:
commit
6261b7eb53
@ -823,8 +823,10 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
|
||||
} else if(el.is(':radio')) {
|
||||
el.val([selected]).change();
|
||||
} else if(fieldName == 'file') {
|
||||
// Can't rely on fieldName, ad UploadFields have different naming convention
|
||||
el = $('#' + fieldName);
|
||||
// UploadField inputs have a slightly different naming convention
|
||||
el = this.find(':input[name="' + fieldName + '[Uploads][]"]');
|
||||
// We need the UploadField "field", not just the input
|
||||
el = el.parents('.ss-uploadfield');
|
||||
|
||||
// We have to wait for the UploadField to initialise
|
||||
(function attach(el, selected) {
|
||||
|
Loading…
Reference in New Issue
Block a user