mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-25 16:51:25 -05:00
Display the correct failed operation on the dashboard edit-item page when it fails to edit/create a record
This commit is contained in:
parent
d667c39af9
commit
880a578454
1 changed files with 3 additions and 2 deletions
|
@ -226,7 +226,8 @@ function editItemInit() {
|
|||
$spinner = $("#loading-modal"),
|
||||
fadeTime = 250,
|
||||
model = $editItem.data("model"),
|
||||
id = $editItem.data("id");
|
||||
id = $editItem.data("id"),
|
||||
operation = id === "new" ? "create" : "update";
|
||||
|
||||
let allowTimes = [],
|
||||
simplemde = [],
|
||||
|
@ -415,7 +416,7 @@ function editItemInit() {
|
|||
uploadImage(response.replace(/^id:/, ""));
|
||||
} else {
|
||||
hideLoadingModal();
|
||||
showAlert("ERROR: Failed to update record");
|
||||
showAlert("ERROR: Failed to " + operation + " record");
|
||||
submitting = false;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue