mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fixed problem while deleting entry with unsaved changes
While deleting an entry it now resets a facet if there are unsaved changes. It prevents pop up of various error dialogs when UI tries to redirect to search page after successful delete. https://fedorahosted.org/freeipa/ticket/3047
This commit is contained in:
parent
da10cc96a6
commit
22b7d7e7d9
@ -1160,6 +1160,8 @@ IPA.object_action = function(spec) {
|
|||||||
return IPA.confirm(msg);
|
return IPA.confirm(msg);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
that.object_execute_action = that.execute_action;
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1201,6 +1203,13 @@ IPA.delete_action = function(spec) {
|
|||||||
|
|
||||||
var that = IPA.object_action(spec);
|
var that = IPA.object_action(spec);
|
||||||
|
|
||||||
|
that.execute_action = function(facet, on_success, on_error) {
|
||||||
|
|
||||||
|
if (facet.is_dirty()) facet.reset();
|
||||||
|
|
||||||
|
that.object_execute_action(facet, on_success, on_error);
|
||||||
|
};
|
||||||
|
|
||||||
that.on_success = function(facet, data, text_status, xhr) {
|
that.on_success = function(facet, data, text_status, xhr) {
|
||||||
|
|
||||||
IPA.notify_success(data.result.summary);
|
IPA.notify_success(data.result.summary);
|
||||||
|
@ -2042,6 +2042,8 @@ IPA.confirm = function(msg) {
|
|||||||
|
|
||||||
IPA.notify_success = function(message) {
|
IPA.notify_success = function(message) {
|
||||||
|
|
||||||
|
if (!message) return; // don't show undefined, null and such
|
||||||
|
|
||||||
function destroy_timeout() {
|
function destroy_timeout() {
|
||||||
if (IPA.notify_success.timeout) window.clearTimeout(IPA.notify_success.timeout);
|
if (IPA.notify_success.timeout) window.clearTimeout(IPA.notify_success.timeout);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user