Error Reporting, und robuster gegen Fehler im Report save/load
[kivitendo-erp.git] / templates / webpages / csv_import / _deferred_results.html
index bc6d683..7f68a32 100644 (file)
@@ -5,8 +5,10 @@
 <h2>[% 'Import Status' | $T8 %]</h2>
 
 [% PROCESS 'common/flash.html' %]
+[% UNLESS SELF.background_job.data_as_hash.errors %]
 <div id='progress_description'></div>
 <div id='progressbar'></div>
+[% END  %]
 <script type='text/javascript'>
   function reload_results () {
     $.ajax({
       error: function(e) { alert(e) },
     });
   }
-[%- UNLESS SELF.background_job.data_as_hash.progress < 0 %]
+[%- UNLESS SELF.background_job.data_as_hash.errors %]
   $(document).ready(function(){
-    $('#progress_description').html('[% SELF.background_job.data_as_hash.progress.plan.${SELF.background_job.data_as_hash.progress.phase} %] / [% SELF.background_job.data_as_hash.progress.num_phases %] [% SELF.background_job.data_as_hash.progress.phase | $T8 | html %]');
+    $('#progress_description').html('[% SELF.status_text | html %]');
     $('#progressbar').progressbar({ value: [% SELF.background_job.data_as_hash.progress.progress * 1 %] });
-    window.setTimeout(reload_results, 100);
+    window.setTimeout(reload_results, 500);
   })
 [%- END %]
 </script>