Spezifisches Recht für CSV-Import
[kivitendo-erp.git] / templates / webpages / csv_import / _deferred_results.html
1 [%- USE L %]
2 [%- USE T8 %]
3 [%- USE HTML %]
4
5 <h2>[% 'Import Status' | $T8 %]</h2>
6
7 [% PROCESS 'common/flash.html' %]
8 [% UNLESS SELF.background_job.data_as_hash.errors %]
9 <div id='progress_description'></div>
10 <div id='progressbar'></div>
11 [% END  %]
12 <script type='text/javascript'>
13   function reload_results () {
14     $.ajax({
15       url: 'controller.pl',
16       data: {
17         action: 'CsvImport/result',
18         'profile.type': '[% SELF.profile.type %]',
19         'csv_import_access' : '[% SELF.csv_import_access %]',
20         job: '[% SELF.background_job.id %]'
21       },
22       success: function(data) { $('#results').html(data) },
23       error: function(e) { alert(e) },
24     });
25   }
26 [%- UNLESS SELF.background_job.data_as_hash.errors %]
27   $(document).ready(function(){
28     $('#progress_description').html('[% SELF.status_text | html %]');
29     $('#progressbar').progressbar({ value: [% SELF.background_job.data_as_hash.progress.progress * 1 %] });
30     window.setTimeout(reload_results, 500);
31   })
32 [%- END %]
33 </script>