1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 01:24:17 +02:00

Send all forms by AJAX

This commit is contained in:
Jakub Vrana
2010-11-23 11:50:53 +01:00
parent 0e29a6a783
commit 38894b2977
5 changed files with 33 additions and 25 deletions

View 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') . "'" . (isset($_GET["select"]) ? " onclick='return !ajaxForm(this.form);'" : "") . ">\n";
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')) . "\" onclick=\"return !ajaxForm(this.form, 'insert=1');\">\n";
echo '<input type="submit" name="insert" value="' . ($update ? lang('Save and continue edit') : lang('Save and insert next')) . "\">\n";
}
}
if ($update) {
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";
echo "<input type='submit' name='delete' value='" . lang('Delete') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\">\n";
}
?>
</form>