]> git.joonet.de Git - adminer.git/commitdiff
Multi save and delete by AJAX
authorJakub Vrana <jakub@vrana.cz>
Mon, 18 Oct 2010 05:43:50 +0000 (07:43 +0200)
committerJakub Vrana <jakub@vrana.cz>
Mon, 18 Oct 2010 05:43:50 +0000 (07:43 +0200)
adminer/edit.inc.php

index 32424b2df0c2da3b5c70ea77a3153d543bf2d6aa..1d23d12cba374cd4f9e259f3bb4f94243b888fe1 100644 (file)
@@ -98,13 +98,13 @@ if (isset($_GET["select"])) {
        hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"]));
 }
 if ($fields) {
-       echo "<input type='submit' value='" . lang('Save') . "'>\n";
+       echo "<input type='submit' value='" . lang('Save') . "'" . (isset($_GET["select"]) ? " onclick='return !ajaxForm(this.form);'" : "") . ">\n";
        if (!isset($_GET["select"])) {
                echo '<input type="submit" name="insert" value="' . ($update ? lang('Save and continue edit') : lang('Save and insert next')) . "\" onclick=\"return !ajaxForm(this.form, 'insert=1');\">\n";
        }
 }
 if ($update) {
-       echo "<input type='submit' name='delete' value='" . lang('Delete') . "'$confirm>\n";
+       echo "<input type='submit' name='delete' value='" . lang('Delete') . "' onclick=\"return confirm('" . lang('Are you sure?') . "')" . (isset($_GET["select"]) ? " &amp;&amp; !ajaxForm(this.form, 'delete=1')" : "") . ";\">\n";
 }
 ?>
 </form>