Actions
Bug #1753
closedShowing a modal from an AJAX request that returns a full-blown HTML page clears the page
Description
How to reproduce:
Edit a host, get a conflict: this displays an error info in a modal dialog.
Ack then overwrite: it should have shown another error info in a modal dialog too,
but instead of an HTML fragment, foreman gave a full HTML page (with html, head and body) as an answer to some AJAX query,
this has the nasty effect of clearing the page, only showing "2012".
Clue:
$.ajax({ [...], success: function(result) { # If result is an HTML fragment, everything is fine # if it is a full HTML page, this will somehow clear the page and show "2012"... $('#modal-frame-content').html(result); } });
This is a general problem that can arise with code like the above.
Actions