mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 08:44:46 +02:00
Fix issue processwire/processwire-issues#2060
This commit is contained in:
@@ -190,6 +190,8 @@ $(document).ready(function() {
|
||||
}
|
||||
|
||||
postUrl += (postUrl.indexOf('?') > -1 ? '&' : '?') + 'InputfieldFileAjax=1';
|
||||
var $f = $('#Inputfield_id');
|
||||
if($f.length) postUrl += '&eid=' + $f.val();
|
||||
|
||||
// CSRF protection
|
||||
var $postToken = $form.find('input._post_token');
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1508,7 +1508,9 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
|
||||
$hasPage = $this->hasPage;
|
||||
if($hasPage && wireInstanceOf($hasPage, 'RepeaterPage')) {
|
||||
$process = $this->wire()->process;
|
||||
if($process instanceof WirePageEditor && $process->getPage()->id === $hasPage->id) {
|
||||
$eid = (int) $this->wire()->input->get('eid');
|
||||
if(!$eid) $eid = $process->getPage()->id;
|
||||
if($process instanceof WirePageEditor && $eid === $hasPage->id) {
|
||||
// repeater page being edited directly or in front-end modal
|
||||
// so no '_repeater' suffix is necessary here
|
||||
} else if(strpos($this->name, '_repeater') === false) {
|
||||
|
@@ -1663,6 +1663,8 @@ function InputfieldImage($) {
|
||||
}
|
||||
|
||||
postUrl += (postUrl.indexOf('?') > -1 ? '&' : '?') + 'InputfieldFileAjax=1';
|
||||
var $f = $('#Inputfield_id');
|
||||
if($f.length) postUrl += '&eid=' + $f.val();
|
||||
|
||||
if(fieldName.indexOf('[') > -1) fieldName = fieldName.slice(0,-2); // trim trailing []
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user