mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 03:04:36 +00:00
Show generic error message on saving master data (this closes #45)
This commit is contained in:
@@ -168,3 +168,18 @@ Grocy.FrontendHelpers.ValidateForm = function(formId)
|
||||
|
||||
$(form).addClass('was-validated');
|
||||
}
|
||||
|
||||
Grocy.FrontendHelpers.ShowGenericError = function(message, exception)
|
||||
{
|
||||
toastr.error(L(message) + '<br><br>' + L('Click to show technical details'), '', {
|
||||
onclick: function()
|
||||
{
|
||||
bootbox.alert({
|
||||
title: L('Error details'),
|
||||
message: JSON.stringify(exception, null, 4)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
console.error(exception);
|
||||
}
|
||||
|
Reference in New Issue
Block a user