- $('#wait_message').html('{% trans "An error has occurred during de export proccess: "%}' + data.errors + '<br />' +
- '{% trans "Please check the log file for a full stack trace." %}')
+ if (data.errors == false) {
+ if (exporting) {
+ $('#wait_message').html('{% trans "Your backup is ready to be downloaded."%}');
+ $('#download_link_a').attr('href', '{% url exporter_download %}?file=' + data.state.overall.fname)
+ $('#download_link').slideDown();
+ } else {
+ $('#wait_message').html('{% trans "All data sucessfully imported."%}')
+ }
+ } else {
+ var msg;
+ if (exporting) {
+ msg = '{% trans "An error has occurred during the export proccess"%}';
+ } else {
+ msg = '{% trans "An error has occurred during the import proccess"%}';
+ }
+ $('#wait_message').html(msg + ': ' + data.errors + '<br />' +
+ '{% trans "Please check the log file for a full stack trace." %}')
+ }