mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
redirect on show error.
This commit is contained in:
committed by
Endi Sukma Dewata
parent
007f6dd4c2
commit
554bda2a85
@@ -641,9 +641,20 @@ IPA.details_facet = function(spec) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
command.on_error = function(xhr, text_status, error_thrown) {
|
command.on_error = function(xhr, text_status, error_thrown) {
|
||||||
|
if (that.entity.redirect_facet) {
|
||||||
|
var current_entity = that.entity;
|
||||||
|
while (current_entity.containing_entity){
|
||||||
|
current_entity = current_entity.containing_entity;
|
||||||
|
}
|
||||||
|
IPA.nav.show_page(
|
||||||
|
current_entity.name,
|
||||||
|
that.entity.redirect_facet);
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
var details = $('.details', that.container).empty();
|
var details = $('.details', that.container).empty();
|
||||||
details.append('<p>Error: '+error_thrown.name+'</p>');
|
details.append('<p>Error: '+error_thrown.name+'</p>');
|
||||||
details.append('<p>'+error_thrown.message+'</p>');
|
details.append('<p>'+error_thrown.message+'</p>');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
command.execute();
|
command.execute();
|
||||||
|
|||||||
Reference in New Issue
Block a user