Self hosted FLOSS fitness/workout, nutrition and weight tracker
In case of error, show a message to the user in the modal
Roland Geiderf24e438e8f19
diff --git a/wger/core/static/js/workout-manager.js b/wger/core/static/js/workout-manager.jsindex 737d62e7a..4a5bbadf6 100644--- a/wger/core/static/js/workout-manager.js+++ b/wger/core/static/js/workout-manager.js@@ -160,6 +160,12 @@ function form_modal_dialog() {$("#ajax-info-content").load(targetUrl + " .form-horizontal",function(responseText, textStatus, XMLHttpRequest){++ if (textStatus == "error") {+ $("#ajax-info-title").html("Sorry but an error occured")+ $("#ajax-info-content").html(XMLHttpRequest.status + " " + XMLHttpRequest.statusText);+ }+// Call other custom initialisation functions// (e.g. if the form as an autocompleter, it has to be initialised again)if (typeof custom_modal_init !== "undefined") {