Diff of /adminer/edit.inc.php [ba1bb2] .. [749f51] Maximize Restore

  Switch to side-by-side view

--- a/adminer/edit.inc.php
+++ b/adminer/edit.inc.php
@@ -47,6 +47,11 @@
 				$location,
 				lang('Item has been updated.')
 			);
+			if (is_ajax()) {
+				page_headers();
+				page_messages($error);
+				exit;
+			}
 		} else {
 			$result = insert_into($TABLE, $set);
 			$last_id = ($result ? last_id() : 0);
@@ -92,6 +97,8 @@
 }
 ?>
 
+<div id="message"></div>
+
 <form action="" method="post" enctype="multipart/form-data" id="form">
 <?php
 if (!$fields) {
@@ -132,7 +139,10 @@
 if ($fields) {
 	echo "<input type='submit' value='" . lang('Save') . "'>\n";
 	if (!isset($_GET["select"])) {
-		echo "<input type='submit' name='insert' value='" . ($update ? lang('Save and continue edit') : lang('Save and insert next')) . "' title='Ctrl+Shift+Enter'>\n";
+		echo "<input type='submit' name='insert' value='" . ($update
+			? lang('Save and continue edit') . "' onclick='return !ajaxForm(this.form, \"" . lang('Loading') . '", this)'
+			: lang('Save and insert next')
+		) . "' title='Ctrl+Shift+Enter'>\n";
 	}
 }
 echo ($update ? "<input type='submit' name='delete' value='" . lang('Delete') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\">\n"