Skip to content
This repository
Browse code

BUGFIX Fixed loading/saving regressions due to new PJAX logic introdu…

…ced in e01b0aa
  • Loading branch information...
commit 1742b4b7426375588b330693cf16314030bb8d29 1 parent 85a898e
Ingo Schommer authored April 10, 2012
2  admin/javascript/LeftAndMain.EditForm.js
@@ -142,7 +142,7 @@
142 142
 			 * Suppress submission unless it is handled through ajaxSubmit().
143 143
 			 */
144 144
 			onsubmit: function(e, button) {
145  
-				this.parents('.cms-content').submitForm(this, button);
  145
+				this.closest('.cms-content').submitForm(this, button);
146 146
 				
147 147
 				return false;
148 148
 			},
2  forms/gridfield/GridField.php
@@ -619,7 +619,7 @@ public function gridFieldAlterAction($data, $form, SS_HTTPRequest $request) {
619 619
 			}
620 620
 		}
621 621
 		
622  
-		switch($request->getHeader('X-Get-Fragment')) {
  622
+		switch($request->getHeader('X-Pjax')) {
623 623
 			case 'CurrentField':
624 624
 				return $this->FieldHolder();
625 625
 				break;
2  forms/gridfield/GridFieldDetailForm.php
@@ -311,7 +311,7 @@ function doSave($data, $form) {
311 311
 		
312 312
 		$form->sessionMessage($message, 'good');
313 313
 
314  
-		return Controller::curr()->redirectBack();
  314
+		return Controller::curr()->redirect($this->Link());
315 315
 	}
316 316
 
317 317
 	function doDelete($data, $form) {

0 notes on commit 1742b4b

Please sign in to comment.
Something went wrong with that request. Please try again.