Multi save and delete by AJAX
This commit is contained in:
parent
e3b829701e
commit
28f494783f
|
@ -98,13 +98,13 @@ if (isset($_GET["select"])) {
|
||||||
hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"]));
|
hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"]));
|
||||||
}
|
}
|
||||||
if ($fields) {
|
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"])) {
|
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')) . "\" onclick=\"return !ajaxForm(this.form, 'insert=1');\">\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($update) {
|
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"]) ? " && !ajaxForm(this.form, 'delete=1')" : "") . ";\">\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue