mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG 3156e755
broke GridField Add forms because guessed frag was wrong
This commit is contained in:
parent
39c6606e13
commit
5591017577
@ -344,7 +344,12 @@ jQuery.noConflict();
|
||||
} else {
|
||||
// Fall back to replacing the content fragment if HTML is returned
|
||||
$data = $(data);
|
||||
guessFragment = $data.is('form') ? 'CurrentForm' : 'Content';
|
||||
|
||||
// Try and guess the fragment if none is provided
|
||||
// TODO: data-pjax-fragment might actually give us the fragment. For now we just check most common case
|
||||
guessFragment = 'Content';
|
||||
if ($data.is('form') && !$data.is('[data-pjax-fragment~=Content]')) guessFragment = 'CurrentForm';
|
||||
|
||||
newFragments[guessFragment] = $data;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user