Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 15cc7149

Von Moritz Bunkus vor fast 8 Jahren hinzugefügt

  • ID 15cc71490ce1c9981ed31d691a33b20899971384
  • Vorgänger 4507456b
  • Nachfolger 6da55ef4

ActionBar: Verwendung beim DATEV-Export

Unterschiede anzeigen:

bin/mozilla/datev.pl
31 31

  
32 32
use SL::Common;
33 33
use SL::DATEV qw(:CONSTANTS);
34
use SL::Locale::String qw(t8);
34 35

  
35 36
use strict;
36 37

  
......
48 49

  
49 50
  my $stamm = SL::DATEV->new->get_datev_stamm;
50 51

  
52
  setup_datev_export_action_bar();
53

  
51 54
  $::form->header;
52 55
  print $::form->parse_html_template('datev/export', $stamm);
53 56

  
......
70 73
  $::lxdebug->enter_sub;
71 74
  $::auth->assert('datev_export');
72 75

  
76
  setup_datev_export2_action_bar();
77

  
73 78
  $::form->header;
74 79
  print $::form->parse_html_template('datev/export_bewegungsdaten');
75 80

  
......
80 85
  $::lxdebug->enter_sub;
81 86
  $::auth->assert('datev_export');
82 87

  
88
  setup_datev_export2_action_bar();
89

  
83 90
  $::form->header;
84 91
  print $::form->parse_html_template('datev/export_stammdaten');
85 92

  
......
115 122
  $datev->export;
116 123

  
117 124
  if (!$datev->errors) {
125
    setup_datev_export3_action_bar(download_token => $datev->download_token);
126

  
118 127
    $::form->header;
119
    print $::form->parse_html_template('datev/export3', { datev => $datev });
128
    print $::form->parse_html_template('datev/export3');
120 129
  } else {
121 130
    $::form->error("Export schlug fehl.\n" . join "\n", $datev->errors);
122 131
  }
......
199 208

  
200 209
  return ($fromdate, $todate);
201 210
}
211

  
212
sub setup_datev_export_action_bar {
213
  my %params = @_;
214

  
215
  for my $bar ($::request->layout->get('actionbar')) {
216
    $bar->add(
217
      action => [
218
        t8('Continue'),
219
        submit    => [ '#form', { action => 'export2' } ],
220
        accesskey => 'enter',
221
      ],
222
    );
223
  }
224
}
225

  
226
sub setup_datev_export2_action_bar {
227
  my %params = @_;
228

  
229
  for my $bar ($::request->layout->get('actionbar')) {
230
    $bar->add(
231
      action => [
232
        t8('Export'),
233
        submit    => [ '#form', { action => 'export3' } ],
234
        accesskey => 'enter',
235
      ],
236
      action => [
237
        t8('Back'),
238
        call => [ 'kivi.history_back' ],
239
      ],
240
    );
241
  }
242
}
243

  
244
sub setup_datev_export3_action_bar {
245
  my %params = @_;
246

  
247
  for my $bar ($::request->layout->get('actionbar')) {
248
    $bar->add(
249
      link => [
250
        t8('Download'),
251
        link => [ 'datev.pl?action=download&download_token=' . $::form->escape($params{download_token}) ],
252
      ],
253
      action => [
254
        t8('Back'),
255
        call => [ 'kivi.history_back' ],
256
      ],
257
    );
258
  }
259
}
locale/de/all
1015 1015
  'Done'                        => 'Fertig',
1016 1016
  'Done.'                       => 'Fertig.',
1017 1017
  'Double partnumbers'          => 'Doppelte Artikelnummern',
1018
  'Download'                    => 'Download',
1018 1019
  'Download PDF'                => 'PDF herunterladen',
1019 1020
  'Download PDF, do not print'  => 'Nicht drucken, sondern PDF herunterladen',
1020 1021
  'Download SEPA XML export file' => 'SEPA-XML-Exportdatei herunterladen',
templates/webpages/datev/export.html
1 1
[%- USE T8 %]
2 2
<h1>[% 'DATEX - Export Assistent' | $T8 %]</h1>
3 3

  
4
<form method=post action='[% script %]'>
4
<form method='post' action='[% script %]' id='form'>
5 5

  
6 6
<table width=100%>
7 7
  <tr>
......
54 54
    <td><hr size=3 noshade></td>
55 55
  </tr>
56 56
</table>
57

  
58
<input type=hidden name=nextsub value=export2>
59

  
60
<br>
61
<input type=submit class=submit name=action value="[% 'Continue' | $T8 %]">
62 57
</form>
63

  
templates/webpages/datev/export3.html
8 8

  
9 9
  <br><b>[% 'KNE-Export erfolgreich!' | $T8 %]</b>
10 10
  <br>
11
  <br>
12
  <a href="datev.pl?action=download&download_token=[% datev.download_token | html %]">Download</a>
13 11

  
14 12
[% IF datev.net_gross_differences.size %]
15 13
[% INCLUDE 'datev/net_gross_difference.html'
......
17 15
  sum_net_gross_differences = datev.sum_net_gross_differences
18 16
%]
19 17
[% END %]
20

  
templates/webpages/datev/export_bewegungsdaten.html
2 2
[%- USE L %]
3 3
<h1>[% 'DATEX - Export Assistent' | $T8 %]</h1>
4 4

  
5
<form method=post action="[% script %]">
5
<form method="post" action="[% script %]" id="form">
6 6

  
7 7
<table width=100%>
8 8
  <tr>
......
69 69
<input type=hidden name=abrechnungsnr value="[% abrechnungsnr %]">
70 70

  
71 71
<input type=hidden name=exporttype value="[% exporttype %]">
72

  
73
<input type=hidden name=nextsub value=export3>
74

  
75
<br>
76
<input type=submit class=submit name=action value="[% 'Continue' | $T8 %]">
77 72
</form>
78

  
templates/webpages/datev/export_stammdaten.html
1 1
[%- USE T8 %]
2 2
<h1>[% 'DATEX - Export Assistent' | $T8 %]</h1>
3 3

  
4
<form method=post action="[% script %]">
4
<form method="post" action="[% script %]" id="form">
5 5
<table width=100%>
6 6
  <tr>
7 7
    <th align=left>[% 'Konten' | $T8 %]</th>
......
35 35
<input type=hidden name=abrechnungsnr value="[% abrechnungsnr %]">
36 36

  
37 37
<input type=hidden name=exporttype value="[% exporttype %]">
38

  
39
<input type=hidden name=nextsub value=export3>
40

  
41
<br>
42
<input type=submit class=submit name=action value="[% 'Continue' | $T8 %]">
43 38
</form>
44

  

Auch abrufbar als: Unified diff