mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 11:40:58 +00:00
Modal for edit and delete part category
This commit is contained in:
@ -51,9 +51,15 @@ function launchDeleteForm(modal, url, options = {}) {
|
||||
success: function (response) {
|
||||
$(modal).modal('hide');
|
||||
|
||||
if (options.redirect) {
|
||||
if (options.success) {
|
||||
options.success();
|
||||
}
|
||||
else if (options.redirect) {
|
||||
window.location.href = options.redirect;
|
||||
}
|
||||
else if (options.reload) {
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
alert('Error deleting item:\n' + thrownError);
|
||||
@ -123,14 +129,15 @@ function launchModalForm(modal, url, options = {}) {
|
||||
|
||||
$(modal).modal('hide');
|
||||
|
||||
if (options.redirect) {
|
||||
window.location.href = options.redirect;
|
||||
}
|
||||
|
||||
if (options.success) {
|
||||
options.success();
|
||||
}
|
||||
|
||||
else if (options.redirect) {
|
||||
window.location.href = options.redirect;
|
||||
}
|
||||
else if (options.reload) {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
else if (response.html_form) {
|
||||
var target = modal + ' .modal-form-content';
|
||||
|
Reference in New Issue
Block a user