Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 83cc6a5b

Von Moritz Bunkus vor fast 17 Jahren hinzugefügt

  • ID 83cc6a5b947fae258c943b16cfdbdad72f4c690a
  • Vorgänger f559ec45
  • Nachfolger d7cf0cbd

Umstellung einiger Vorlagen aus templates/webpages/generic von HTML::Template auf Template. Die Vorlagen calculate_alu* werden gar nicht benutzt und deswegen entfernt.

Unterschiede anzeigen:

SL/Form.pm
611 611
sub show_generic_error {
612 612
  my ($self, $error, $title, $action) = @_;
613 613

  
614
  my $add_params = {};
615
  $add_params->{"title"} = $title if ($title);
616
  $self->{"label_error"} = $error;
614
  my $add_params = {
615
    'title_error' => $title,
616
    'label_error' => $error,
617
  };
617 618

  
618 619
  my @vars;
619 620
  if ($action) {
......
626 627
  }
627 628
  $add_params->{"VARIABLES"} = \@vars;
628 629

  
630
  $self->{title} = $title if ($title);
631

  
629 632
  $self->header();
630
  print($self->parse_html_template("generic/error", $add_params));
633
  print $self->parse_html_template2("generic/error", $add_params);
631 634

  
632 635
  die("Error: $error\n");
633 636
}
634 637

  
635 638
sub show_generic_information {
636
  my ($self, $error, $title) = @_;
639
  my ($self, $text, $title) = @_;
640

  
641
  my $add_params = {
642
    'title_information' => $title,
643
    'label_information' => $text,
644
  };
637 645

  
638
  my $add_params = {};
639
  $add_params->{"title"} = $title if ($title);
640
  $self->{"label_information"} = $error;
646
  $self->{title} = $title if ($title);
641 647

  
642 648
  $self->header();
643
  print($self->parse_html_template("generic/information", $add_params));
649
  print $self->parse_html_template2("generic/information", $add_params);
644 650

  
645 651
  die("Information: $error\n");
646 652
}
bin/mozilla/common.pl
395 395
  $form->{formel} = $formel; 
396 396
  $form->{"title"} = $locale->text("Please enter values");
397 397
  $form->header();
398
  print($form->parse_html_template("generic/calculate_qty", { "HEADER" => \@header,
399
                                                                   "VARIABLES" => \@variable,
400
                                                                   "onload" => $onload }));
398
  print($form->parse_html_template2("generic/calculate_qty", { "HEADER"    => \@header,
399
                                                               "VARIABLES" => \@variable,
400
                                                               "onload"    => $onload }));
401 401

  
402 402
  $lxdebug->leave_sub();
403 403
}
bin/mozilla/io.pl
676 676

  
677 677
sub edit_e_mail {
678 678
  $lxdebug->enter_sub();
679

  
679 680
  if ($form->{second_run}) {
680 681
    $form->{print_and_post} = 0;
681 682
    $form->{resubmit}       = 0;
......
699 700
  $form->header;
700 701

  
701 702
  my (@dont_hide_key_list, %dont_hide_key, @hidden_keys);
702
  @dont_hide_key_list = qw(action email cc bcc subject message formname sendmode format header override);
703
  @dont_hide_key_list = qw(action email cc bcc subject message sendmode format header override);
703 704
  @dont_hide_key{@dont_hide_key_list} = (1) x @dont_hide_key_list;
704
  @hidden_keys = grep { !$dont_hide_key{$_} } grep { !ref $form->{$_} } keys %$form;
705

  
706
  print $form->parse_html_template('generic/edit_email', 
707
                                  { title           => $title,
708
                                    a_filename      => $attachment_filename,
709
                                    _print_options_ => print_options('inline' => 1),
710
                                    HIDDEN          => [ map +{ name => $_, value => $form->{$_} }, @hidden_keys ],
711
                                    SHOW_BCC        => $myconfig{role} eq 'admin' });
705
  @hidden_keys = sort grep { !$dont_hide_key{$_} } grep { !ref $form->{$_} } keys %$form;
706

  
707
  print $form->parse_html_template2('generic/edit_email',
708
                                    { title           => $title,
709
                                      a_filename      => $attachment_filename,
710
                                      _print_options_ => print_options('inline' => 1),
711
                                      HIDDEN          => [ map +{ name => $_, value => $form->{$_} }, @hidden_keys ],
712
                                      SHOW_BCC        => $myconfig{role} eq 'admin' });
712 713

  
713 714
  $lxdebug->leave_sub();
714 715
}
templates/webpages/generic/calculate_alu_de.html
1
<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
2

  
3
 <form name="Form">
4

  
5
  <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
6
  <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
7
  <input type="hidden" name="calc_length" value="<TMPL_VAR NAME=calc_length ESCAPE=HTML>">
8
  <input type="hidden" name="calc_weight" value="<TMPL_VAR NAME=calc_weight ESCAPE=HTML>">
9
  <input type="hidden" name="row" value="<TMPL_VAR NAME=row ESCAPE=HTML>">
10
  <input type="hidden" name="description" value="<TMPL_VAR NAME=description ESCAPE=HTML>">
11

  
12
  <table width="100%">
13
   <tr>
14
    <th class="listtop"><TMPL_VAR NAME=title></th>
15
   </tr>
16
   <tr height="5"></tr>
17

  
18
   <tr><td>Menge und Preise unten eingeben</td></tr>
19

  
20
   <tr>
21
    <td>
22

  
23
     <table>
24
      <tr>
25
        <th nowrap class="listheading" colspan=2><TMPL_VAR NAME=description ESCAPE=HTML></th>
26
      <tr class="listheading">
27
        <th nowrap class="listheading">Gesamtl&auml;nge des Artikels</th>
28
        <th nowrap class="listheading">Gewicht pro Meter</th>
29
      </tr>
30

  
31
       <tr class="listrow_1">
32
        <td><TMPL_VAR NAME=length ESCAPE=HTML></td>
33
        <td><TMPL_VAR NAME=weight ESCAPE=HTML></td>
34
       </tr>
35
     </table>
36

  
37
    </td>
38
    </tr>
39
    <tr>
40
    <th nowrap class="listheading">Preis Alu:</th>
41
    <td><input id="price_alu" name="price_alu" value="<TMPL_VAR NAME=price_alu ESCAPE=HTML>"></td>
42
    </tr>
43
    <tr>
44
    <th nowrap class="listheading">Preis Eloxal:</th>
45
    <td><input id="price_eloxal" name="price_eloxal" value="<TMPL_VAR NAME=price_eloxal ESCAPE=HTML>"></td>
46
   </tr>
47
   <tr>
48
    <td colspan=2><hr size=3 noshade></td>
49
    </tr>
50
    <tr>
51
    <th nowrap class="listheading">Menge Alu:</th>
52
    <td><input id="qty_alu" name="qty_alu" value="<TMPL_VAR NAME=qty_alu ESCAPE=HTML>"></td>
53
    </tr>
54
    <tr>
55
    <th nowrap class="listheading">Menge Artikel:</th>
56
    <td><input id="qty_article" name="qty_article" value="<TMPL_VAR NAME=qty ESCAPE=HTML>"></td>
57
   </tr>  
58
   <tr>
59
    <td colspan=2><hr size=3 noshade></td>
60
    </tr>
61
    <tr>
62
    <th nowrap class="listheading">Gesamtpreis:</th>
63
    <td><input id="total" name="total"  value="<TMPL_VAR NAME=total ESCAPE=HTML>"></td>
64
    </tr>
65
    <tr>
66
    <th nowrap class="listheading">Gesamtpreis Alu:</th>
67
    <td><input id="total_alu" name="total_alu"  value="<TMPL_VAR NAME=total_alu ESCAPE=HTML>"></td>
68
   </tr>  
69
    <tr>
70
    <th nowrap class="listheading">Gesamtpreis Eloxal:</th>
71
    <td><input id="total_eloxal" name="total_eloxal"  value="<TMPL_VAR NAME=total_eloxal ESCAPE=HTML>"></td>
72
   </tr></table>
73
 <button type="button" onclick="calculate_alu()">Berechnen</button>
74
  <button type="button" onclick="alu_close()">?bernehmen</button>
75
</form>
76

  
77
 <script type="text/javascript">
78

  
79
      function calculate_alu() {
80
        var qty_alu = document.getElementsByName("qty_alu")[0].value.replace(/,/g, ".");
81
        var price_alu = document.getElementsByName("price_alu")[0].value.replace(/,/g, ".");
82
        var price_eloxal = document.getElementsByName("price_eloxal")[0].value.replace(/,/g, ".");
83
        var weight_article = document.getElementsByName("calc_weight")[0].value * document.getElementsByName("calc_length")[0].value;
84
        var qty_article = Math.ceil(qty_alu / weight_article);
85
        qty_alu = qty_article * weight_article;
86
        alu = qty_alu * price_alu;
87
        var qty_eloxal = qty_article * document.getElementsByName("calc_length")[0].value;
88
        eloxal = qty_eloxal * price_eloxal;
89
        
90

  
91
        total = alu + eloxal;
92
        alu = number_format(alu, 2, ",", ".");
93
        eloxal = number_format(eloxal, 2, ",", ".");
94
        total = number_format(total, 2, ",", ".");
95
        self.document.getElementsByName("qty_alu")[0].value = qty_alu;
96
        self.document.getElementsByName("qty_article")[0].value = qty_article;
97
        self.document.getElementsByName("total_alu")[0].value = alu;
98
        self.document.getElementsByName("total_eloxal")[0].value = eloxal;
99
        self.document.getElementsByName("total")[0].value = total;
100
      }
101

  
102
      function alu_close() {
103

  
104
        var qty_alu = document.getElementsByName("qty_alu")[0].value.replace(/,/g, ".");
105
        var price_alu = document.getElementsByName("price_alu")[0].value.replace(/,/g, ".");
106
        var price_eloxal = document.getElementsByName("price_eloxal")[0].value.replace(/,/g, ".");
107
        var weight_article = document.getElementsByName("calc_weight")[0].value * document.getElementsByName("calc_length")[0].value;
108
        var qty_article = Math.ceil(qty_alu / weight_article);
109
        qty_alu = qty_article * weight_article;
110
        alu = qty_alu * price_alu;
111
        var qty_eloxal = qty_article * document.getElementsByName("calc_length")[0].value;
112
        eloxal = qty_eloxal * price_eloxal;
113
        var sellprice = 
114

  
115

  
116
        total = alu + eloxal;
117
        var sellprice = total / qty_article
118
        qty_alu = number_format(qty_alu, 2, ",", ".");
119
        qty_eloxal = number_format(qty_eloxal, 2, ",", ".");
120
        alu = number_format(alu, 2, ",", ".");
121
        eloxal = number_format(eloxal, 2, ",", ".");
122
        sellprice = number_format(sellprice, 2, ",", ".");
123
        var sellprice_index = window.opener.document.getElementsByName("sellprice_" + document.getElementsByName("row")[0].value).length - 1;
124

  
125

  
126
        var article = document.getElementsByName("description")[0].value + "\r\nAlupreisberechnung:\r\n" + qty_alu + "kg Aluminiumprofil Einzelpreis: " + document.getElementsByName("price_alu")[0].value  +" Gesamt: " + alu + "\r\n" + qty_eloxal + "m Eloxal Einzelpreis: " + document.getElementsByName("price_eloxal")[0].value + " Gesamt: " + eloxal;
127
        window.opener.document.getElementsByName("qty_" + document.getElementsByName("row")[0].value)[0].value = qty_article;
128
        window.opener.document.getElementsByName("sellprice_" + document.getElementsByName("row")[0].value)[sellprice_index].value = sellprice;
129
        window.opener.document.getElementsByName("description_" + document.getElementsByName("row")[0].value)[0].value = article;
130
        self.close();
131
      }
132
function /*out: String*/ number_format( /* in: float   */ number, 
133
                                        /* in: integer */ laenge, 
134
                                        /* in: String  */ sep, 
135
                                        /* in: String  */ th_sep ) {
136

  
137
  number = Math.round( number * Math.pow(10, laenge) ) / Math.pow(10, laenge);
138
  str_number = number+"";
139
  arr_int = str_number.split(".");
140
  if(!arr_int[0]) arr_int[0] = "0";
141
  if(!arr_int[1]) arr_int[1] = "";
142
  if(arr_int[1].length < laenge){
143
    nachkomma = arr_int[1];
144
    for(i=arr_int[1].length+1; i <= laenge; i++){  nachkomma += "0";  }
145
    arr_int[1] = nachkomma;
146
  }
147
  if(th_sep != "" && arr_int[0].length > 3){
148
    Begriff = arr_int[0];
149
    arr_int[0] = "";
150
    for(j = 3; j < Begriff.length ; j+=3){
151
      Extrakt = Begriff.slice(Begriff.length - j, Begriff.length - j + 3);
152
      arr_int[0] = th_sep + Extrakt +  arr_int[0] + "";
153
    }
154
    str_first = Begriff.substr(0, (Begriff.length % 3 == 0)?3:(Begriff.length % 3));
155
    arr_int[0] = str_first + arr_int[0];
156
  }
157
  return arr_int[0]+sep+arr_int[1];
158
}
159
 </script>
160

  
161
</body>
162
</html>
templates/webpages/generic/calculate_alu_master.html
1
<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
2

  
3
 <form name="Form">
4

  
5
  <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
6
  <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
7
  <input type="hidden" name="calc_length" value="<TMPL_VAR NAME=calc_length ESCAPE=HTML>">
8
  <input type="hidden" name="calc_weight" value="<TMPL_VAR NAME=calc_weight ESCAPE=HTML>">
9
  <input type="hidden" name="row" value="<TMPL_VAR NAME=row ESCAPE=HTML>">
10
  <input type="hidden" name="description" value="<TMPL_VAR NAME=description ESCAPE=HTML>">
11

  
12
  <table width="100%">
13
   <tr>
14
    <th class="listtop"><TMPL_VAR NAME=title></th>
15
   </tr>
16
   <tr height="5"></tr>
17

  
18
   <tr><td><translate>Insert quantity and prices below.</translate></td></tr>
19

  
20
   <tr>
21
    <td>
22

  
23
     <table>
24
      <tr>
25
        <th nowrap class="listheading" colspan=2><TMPL_VAR NAME=description ESCAPE=HTML></th>
26
      <tr class="listheading">
27
        <th nowrap class="listheading"><translate>Total length</translate></th>
28
        <th nowrap class="listheading"><translate>Weight/m</translate></th>
29
      </tr>
30

  
31
       <tr class="listrow_1">
32
        <td><TMPL_VAR NAME=length ESCAPE=HTML></td>
33
        <td><TMPL_VAR NAME=weight ESCAPE=HTML></td>
34
       </tr>
35
     </table>
36

  
37
    </td>
38
    </tr>
39
    <tr>
40
    <th nowrap class="listheading"><translate>Price Alu:</translate></th>
41
    <td><input id="price_alu" name="price_alu" value="<TMPL_VAR NAME=price_alu ESCAPE=HTML>"></td>
42
    </tr>
43
    <tr>
44
    <th nowrap class="listheading"><translate>Price Eloxal:</translate></th>
45
    <td><input id="price_eloxal" name="price_eloxal" value="<TMPL_VAR NAME=price_eloxal ESCAPE=HTML>"></td>
46
   </tr>
47
   <tr>
48
    <td colspan=2><hr size=3 noshade></td>
49
    </tr>
50
    <tr>
51
    <th nowrap class="listheading"><translate>Quantity Alu:</translate></th>
52
    <td><input id="qty_alu" name="qty_alu" value="<TMPL_VAR NAME=qty_alu ESCAPE=HTML>"></td>
53
    </tr>
54
    <tr>
55
    <th nowrap class="listheading"><translate>Quantity Article:</translate></th>
56
    <td><input id="qty_article" name="qty_article" value="<TMPL_VAR NAME=qty ESCAPE=HTML>"></td>
57
   </tr>  
58
   <tr>
59
    <td colspan=2><hr size=3 noshade></td>
60
    </tr>
61
    <tr>
62
    <th nowrap class="listheading"><translate>Total:</translate></th>
63
    <td><input id="total" name="total"  value="<TMPL_VAR NAME=total ESCAPE=HTML>"></td>
64
    </tr>
65
    <tr>
66
    <th nowrap class="listheading"><translate>Total Alu:</translate></th>
67
    <td><input id="total_alu" name="total_alu"  value="<TMPL_VAR NAME=total_alu ESCAPE=HTML>"></td>
68
   </tr>  
69
    <tr>
70
    <th nowrap class="listheading"><translate>Total Eloxal:</translate></th>
71
    <td><input id="total_eloxal" name="total_eloxal"  value="<TMPL_VAR NAME=total_eloxal ESCAPE=HTML>"></td>
72
   </tr></table>
73
 <button type="button" onclick="calculate_alu()"><translate>Calculate</translate></button>
74
  <button type="button" onclick="alu_close()"><translate>Close</translate></button>
75
</form>
76

  
77
 <script type="text/javascript">
78

  
79
      function calculate_alu() {
80
        var qty_alu = document.getElementsByName("qty_alu")[0].value.replace(/,/g, ".");
81
        var price_alu = document.getElementsByName("price_alu")[0].value.replace(/,/g, ".");
82
        var price_eloxal = document.getElementsByName("price_eloxal")[0].value.replace(/,/g, ".");
83
        var weight_article = document.getElementsByName("calc_weight")[0].value * document.getElementsByName("calc_length")[0].value;
84
        var qty_article = Math.ceil(qty_alu / weight_article);
85
        qty_alu = qty_article * weight_article;
86
        alu = qty_alu * price_alu;
87
        var qty_eloxal = qty_article * document.getElementsByName("calc_length")[0].value;
88
        eloxal = qty_eloxal * price_eloxal;
89
        
90

  
91
        total = alu + eloxal;
92
        alu = number_format(alu, 2, ",", ".");
93
        eloxal = number_format(eloxal, 2, ",", ".");
94
        total = number_format(total, 2, ",", ".");
95
        self.document.getElementsByName("qty_alu")[0].value = qty_alu;
96
        self.document.getElementsByName("qty_article")[0].value = qty_article;
97
        self.document.getElementsByName("total_alu")[0].value = alu;
98
        self.document.getElementsByName("total_eloxal")[0].value = eloxal;
99
        self.document.getElementsByName("total")[0].value = total;
100
      }
101

  
102
      function alu_close() {
103

  
104
        var qty_alu = document.getElementsByName("qty_alu")[0].value.replace(/,/g, ".");
105
        var price_alu = document.getElementsByName("price_alu")[0].value.replace(/,/g, ".");
106
        var price_eloxal = document.getElementsByName("price_eloxal")[0].value.replace(/,/g, ".");
107
        var weight_article = document.getElementsByName("calc_weight")[0].value * document.getElementsByName("calc_length")[0].value;
108
        var qty_article = Math.ceil(qty_alu / weight_article);
109
        qty_alu = qty_article * weight_article;
110
        alu = qty_alu * price_alu;
111
        var qty_eloxal = qty_article * document.getElementsByName("calc_length")[0].value;
112
        eloxal = qty_eloxal * price_eloxal;
113
        var sellprice = 
114

  
115

  
116
        total = alu + eloxal;
117
        var sellprice = total / qty_article
118
        qty_alu = number_format(qty_alu, 2, ",", ".");
119
        qty_eloxal = number_format(qty_eloxal, 2, ",", ".");
120
        alu = number_format(alu, 2, ",", ".");
121
        eloxal = number_format(eloxal, 2, ",", ".");
122
        sellprice = number_format(sellprice, 2, ",", ".");
123
        var sellprice_index = window.opener.document.getElementsByName("sellprice_" + document.getElementsByName("row")[0].value).length - 1;
124

  
125

  
126
        var article = document.getElementsByName("description")[0].value + "\r\nAlupreisberechnung:\r\n" + qty_alu + "kg Aluminiumprofil Einzelpreis: " + document.getElementsByName("price_alu")[0].value  +" Gesamt: " + alu + "\r\n" + qty_eloxal + "m Eloxal Einzelpreis: " + document.getElementsByName("price_eloxal")[0].value + " Gesamt: " + eloxal;
127
        window.opener.document.getElementsByName("qty_" + document.getElementsByName("row")[0].value)[0].value = qty_article;
128
        window.opener.document.getElementsByName("sellprice_" + document.getElementsByName("row")[0].value)[sellprice_index].value = sellprice;
129
        window.opener.document.getElementsByName("description_" + document.getElementsByName("row")[0].value)[0].value = article;
130
        self.close();
131
      }
132
function /*out: String*/ number_format( /* in: float   */ number, 
133
                                        /* in: integer */ laenge, 
134
                                        /* in: String  */ sep, 
135
                                        /* in: String  */ th_sep ) {
136

  
137
  number = Math.round( number * Math.pow(10, laenge) ) / Math.pow(10, laenge);
138
  str_number = number+"";
139
  arr_int = str_number.split(".");
140
  if(!arr_int[0]) arr_int[0] = "0";
141
  if(!arr_int[1]) arr_int[1] = "";
142
  if(arr_int[1].length < laenge){
143
    nachkomma = arr_int[1];
144
    for(i=arr_int[1].length+1; i <= laenge; i++){  nachkomma += "0";  }
145
    arr_int[1] = nachkomma;
146
  }
147
  if(th_sep != "" && arr_int[0].length > 3){
148
    Begriff = arr_int[0];
149
    arr_int[0] = "";
150
    for(j = 3; j < Begriff.length ; j+=3){
151
      Extrakt = Begriff.slice(Begriff.length - j, Begriff.length - j + 3);
152
      arr_int[0] = th_sep + Extrakt +  arr_int[0] + "";
153
    }
154
    str_first = Begriff.substr(0, (Begriff.length % 3 == 0)?3:(Begriff.length % 3));
155
    arr_int[0] = str_first + arr_int[0];
156
  }
157
  return arr_int[0]+sep+arr_int[1];
158
}
159
 </script>
160

  
161
</body>
162
</html>
templates/webpages/generic/calculate_qty_de.html
1
<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
1
[% USE HTML %]<body onload="[% onload %]">
2 2

  
3 3
 <form name="Form">
4 4

  
5
  <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
6
  <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
5
  <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
6
  <input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
7 7

  
8 8
  <table width="100%">
9 9
   <tr>
10
    <th class="listtop"><TMPL_VAR NAME=title></th>
10
    <th class="listtop">[% title %]</th>
11 11
   </tr>
12 12
   <tr height="5"></tr>
13 13

  
......
18 18

  
19 19
     <table>
20 20
      <tr class="listheading">
21
       <TMPL_LOOP NAME=HEADER>
22
        <th nowrap class="listheading"><TMPL_VAR NAME=column_title></a></th>
23
       </TMPL_LOOP>
21
       [% FOREACH col = HEADER %]
22
        <th nowrap class="listheading">[% col.column_title %]</a></th>
23
       [% END %]
24 24
      </tr>
25 25

  
26
      <TMPL_LOOP NAME=VARIABLES>
27
       <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
28
        <td><TMPL_VAR NAME=description ESCAPE=HTML>:</td><td><input id="<TMPL_VAR NAME=name>" name="<TMPL_VAR NAME=name>" value=></td>
29
        <td><TMPL_VAR NAME=unit ESCAPE=HTML></td>
26
      [% FOREACH row = VARIABLES %]
27
       <tr class="listrow[% loop.count % 2 %]">
28
        <td>[% HTML.escape(row.description) %]:</td><td><input id="[% row.name %]" name="[% row.name %]" value=""></td>
29
        <td>[% HTML.escape(row.unit) %]</td>
30 30
       </tr>
31
      </TMPL_LOOP>
31
      [% END %]
32 32
     </table>
33 33

  
34 34
    </td>
......
40 40
 <script type="text/javascript">
41 41
  <!--//
42 42
      function calculate_qty() {
43
        <TMPL_LOOP NAME=VARIABLES>
44
        var <TMPL_VAR NAME=name> = document.getElementsByName("<TMPL_VAR NAME=name>")[0].value.replace(/,/g, ".");
45
       </TMPL_LOOP>
46
        var result = <TMPL_VAR NAME=formel>;
43
        [% FOREACH row = VARIABLES %]
44
        var [% row.name %] = document.getElementsByName("[% row.name %]")[0].value.replace(/,/g, ".");
45
       [% END %]
46
        var result = [% formel %];
47 47
        result = number_format(result, 2, ",", ".");
48 48
        window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = result;
49 49
        self.close();
templates/webpages/generic/calculate_qty_master.html
1
<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
1
[% USE HTML %]<body onload="[% onload %]">
2 2

  
3 3
 <form name="Form">
4 4

  
5
  <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
6
  <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
5
  <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
6
  <input type="hidden" name="input_id" value="[% HTML.escape(input_id) %]">
7 7

  
8 8
  <table width="100%">
9 9
   <tr>
10
    <th class="listtop"><TMPL_VAR NAME=title></th>
10
    <th class="listtop">[% title %]</th>
11 11
   </tr>
12 12
   <tr height="5"></tr>
13 13

  
......
18 18

  
19 19
     <table>
20 20
      <tr class="listheading">
21
       <TMPL_LOOP NAME=HEADER>
22
        <th nowrap class="listheading"><TMPL_VAR NAME=column_title></a></th>
23
       </TMPL_LOOP>
21
       [% FOREACH col = HEADER %]
22
        <th nowrap class="listheading">[% col.column_title %]</a></th>
23
       [% END %]
24 24
      </tr>
25 25

  
26
      <TMPL_LOOP NAME=VARIABLES>
27
       <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
28
        <td><TMPL_VAR NAME=description ESCAPE=HTML>:</td><td><input id="<TMPL_VAR NAME=name>" name="<TMPL_VAR NAME=name>" value=></td>
29
        <td><TMPL_VAR NAME=unit ESCAPE=HTML></td>
26
      [% FOREACH row = VARIABLES %]
27
       <tr class="listrow[% loop.count % 2 %]">
28
        <td>[% HTML.escape(row.description) %]:</td><td><input id="[% row.name %]" name="[% row.name %]" value=""></td>
29
        <td>[% HTML.escape(row.unit) %]</td>
30 30
       </tr>
31
      </TMPL_LOOP>
31
      [% END %]
32 32
     </table>
33 33

  
34 34
    </td>
......
40 40
 <script type="text/javascript">
41 41
  <!--//
42 42
      function calculate_qty() {
43
        <TMPL_LOOP NAME=VARIABLES>
44
        var <TMPL_VAR NAME=name> = document.getElementsByName("<TMPL_VAR NAME=name>")[0].value.replace(/,/g, ".");
45
       </TMPL_LOOP>
46
        var result = <TMPL_VAR NAME=formel>;
43
        [% FOREACH row = VARIABLES %]
44
        var [% row.name %] = document.getElementsByName("[% row.name %]")[0].value.replace(/,/g, ".");
45
       [% END %]
46
        var result = [% formel %];
47 47
        result = number_format(result, 2, ",", ".");
48 48
        window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = result;
49 49
        self.close();
templates/webpages/generic/edit_email_de.html
1
<body onload="fokus()">
1
[% USE HTML %]<body onload="fokus()">
2 2

  
3
<form name="Form" method="post" action="<TMPL_VAR script>">
3
<form name="Form" method="post" action="[% script %]">
4 4

  
5 5
<table width="100%">
6 6
  <tr class="listtop">
7 7

  
8
    <th class="listtop"><TMPL_VAR title></th>
8
    <th class="listtop">[% title %]</th>
9 9
  </tr>
10 10
  <tr height="5"></tr>
11 11
  <tr>
......
14 14
        <tr>
15 15
          <th align="right" nowrap>An</th>
16 16

  
17
          <td><input name="email" size="30" value="<TMPL_VAR email>"></td>
17
          <td><input name="email" size="30" value="[% HTML.escape(email) %]"></td>
18 18
        </tr>
19 19
        <tr>
20 20
          <th align="right" nowrap>Cc</th>
21
          <td><input name="cc" size="30" value="<TMPL_VAR cc>"></td>
21
          <td><input name="cc" size="30" value="[% HTML.escape(cc) %]"></td>
22 22
        </tr>
23
<TMPL_IF SHOW_BCC>
23
[% IF SHOW_BCC %]
24 24
        <tr>
25 25
          <th align="right" nowrap>Bcc</th>
26
          <td><input name="bcc" size="30" value="<TMPL_VAR bcc>"></td>
27
        </tr></TMPL_IF>
26
          <td><input name="bcc" size="30" value="[% HTML.escape(bcc) %]"></td>
27
        </tr>[% END %]
28 28
        <tr>
29 29
          <th align="right" nowrap>Betreff</th>
30 30

  
31
          <td><input name="subject" size="30" value="<TMPL_VAR subject>"></td>
31
          <td><input name="subject" size="30" value="[% HTML.escape(subject) %]"></td>
32 32
        </tr>
33 33
        <tr>
34 34
          <th align="right" nowrap>Name des Anhangs</th>
35
          <td><input name="attachment_filename" size="30" value="<TMPL_VAR a_filename>"></td>
35
          <td><input name="attachment_filename" size="30" value="[% HTML.escape(a_filename) %]"></td>
36 36
      </table>
37 37
    </td>
38 38
  </tr>
......
44 44
          <th align="left" nowrap>Nachricht</th>
45 45
        </tr>
46 46
        <tr>
47
          <td><textarea name="message" rows="15" cols="60" wrap="soft"><TMPL_VAR message></textarea></td>
47
          <td><textarea name="message" rows="15" cols="60" wrap="soft">[% HTML.escape(message) %]</textarea></td>
48 48

  
49 49
        </tr>
50 50
      </table>
......
53 53
  <tr>
54 54
    <td>
55 55

  
56
<TMPL_VAR _print_options_>
57
<TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR name>" value="<TMPL_VAR value ESCAPE=HTML>"></TMPL_LOOP>
56
[% _print_options_ %]
57
[% FOREACH row = HIDDEN %]<input type="hidden" name="[% row.name %]" value="[% HTML.escape(row.value) %]">
58
[% END %]
58 59

  
59 60
    </td>
60 61
  </tr>
templates/webpages/generic/edit_email_master.html
1
<body onload="fokus()">
1
[% USE HTML %]<body onload="fokus()">
2 2

  
3
<form name="Form" method="post" action="<TMPL_VAR script>">
3
<form name="Form" method="post" action="[% script %]">
4 4

  
5 5
<table width="100%">
6 6
  <tr class="listtop">
7 7

  
8
    <th class="listtop"><TMPL_VAR title></th>
8
    <th class="listtop">[% title %]</th>
9 9
  </tr>
10 10
  <tr height="5"></tr>
11 11
  <tr>
......
14 14
        <tr>
15 15
          <th align="right" nowrap><translate>To</translate></th>
16 16

  
17
          <td><input name="email" size="30" value="<TMPL_VAR email>"></td>
17
          <td><input name="email" size="30" value="[% HTML.escape(email) %]"></td>
18 18
        </tr>
19 19
        <tr>
20 20
          <th align="right" nowrap><translate>Cc</translate></th>
21
          <td><input name="cc" size="30" value="<TMPL_VAR cc>"></td>
21
          <td><input name="cc" size="30" value="[% HTML.escape(cc) %]"></td>
22 22
        </tr>
23
<TMPL_IF SHOW_BCC>
23
[% IF SHOW_BCC %]
24 24
        <tr>
25 25
          <th align="right" nowrap><translate>Bcc</translate></th>
26
          <td><input name="bcc" size="30" value="<TMPL_VAR bcc>"></td>
27
        </tr></TMPL_IF>
26
          <td><input name="bcc" size="30" value="[% HTML.escape(bcc) %]"></td>
27
        </tr>[% END %]
28 28
        <tr>
29 29
          <th align="right" nowrap><translate>Subject</translate></th>
30 30

  
31
          <td><input name="subject" size="30" value="<TMPL_VAR subject>"></td>
31
          <td><input name="subject" size="30" value="[% HTML.escape(subject) %]"></td>
32 32
        </tr>
33 33
        <tr>
34 34
          <th align="right" nowrap><translate>Attachment name</translate></th>
35
          <td><input name="attachment_filename" size="30" value="<TMPL_VAR a_filename>"></td>
35
          <td><input name="attachment_filename" size="30" value="[% HTML.escape(a_filename) %]"></td>
36 36
      </table>
37 37
    </td>
38 38
  </tr>
......
44 44
          <th align="left" nowrap><translate>Message</translate></th>
45 45
        </tr>
46 46
        <tr>
47
          <td><textarea name="message" rows="15" cols="60" wrap="soft"><TMPL_VAR message></textarea></td>
47
          <td><textarea name="message" rows="15" cols="60" wrap="soft">[% HTML.escape(message) %]</textarea></td>
48 48

  
49 49
        </tr>
50 50
      </table>
......
53 53
  <tr>
54 54
    <td>
55 55

  
56
<TMPL_VAR _print_options_>
57
<TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR name>" value="<TMPL_VAR value ESCAPE=HTML>"></TMPL_LOOP>
56
[% _print_options_ %]
57
[% FOREACH row = HIDDEN %]<input type="hidden" name="[% row.name %]" value="[% HTML.escape(row.value) %]">
58
[% END %]
58 59

  
59 60
    </td>
60 61
  </tr>
templates/webpages/generic/error_de.html
1
<body>
2
 <table width=100%>
1
[% USE HTML %]<body>
2
 <table width="100%">
3 3
  <tr>
4
   <th class=listtop><TMPL_VAR NAME=title DEFAULT="Fehler!"></th>
4
   <th class="listtop">[% IF title_error %][% title_error %][% ELSE %]Fehler![% END %]</th>
5 5
  </tr>
6 6
  <tr height="5"></tr>
7 7

  
8
  <tr><td><TMPL_VAR NAME=label_error></td></tr>
8
  <tr><td>[% label_error %]</td></tr>
9 9
 </table>
10 10

  
11
 <TMPL_VAR NAME=DEBUG>
12

  
13 11
</body>
14 12
</html>
templates/webpages/generic/error_master.html
1
<body>
2
 <table width=100%>
1
[% USE HTML %]<body>
2
 <table width="100%">
3 3
  <tr>
4
   <th class=listtop><TMPL_VAR NAME=title DEFAULT="<translate>Error!</translate>"></th>
4
   <th class="listtop">[% IF title_error %][% title_error %][% ELSE %]<translate>Error!</translate>[% END %]</th>
5 5
  </tr>
6 6
  <tr height="5"></tr>
7 7

  
8
  <tr><td><TMPL_VAR NAME=label_error></td></tr>
8
  <tr><td>[% label_error %]</td></tr>
9 9
 </table>
10 10

  
11
 <TMPL_VAR NAME=DEBUG>
12

  
13 11
</body>
14 12
</html>
templates/webpages/generic/information_de.html
1
<body>
2
 <table width=100%>
1
[% USE HTML %]<body>
2
 <table width="100%">
3 3
  <tr>
4
   <th class=listtop><TMPL_VAR NAME=title DEFAULT="Information"></th>
4
   <th class="listtop">[% IF title_information %][% title_information %][% ELSE %]Information[% END %]</th>
5 5
  </tr>
6 6
  <tr height="5"></tr>
7 7

  
8
  <tr><td><TMPL_VAR NAME=label_information></td></tr>
8
  <tr><td>[% label_information %]</td></tr>
9 9
 </table>
10 10

  
11
 <TMPL_VAR NAME=DEBUG>
12

  
13 11
</body>
14 12
</html>
templates/webpages/generic/information_master.html
1
<body>
2
 <table width=100%>
1
[% USE HTML %]<body>
2
 <table width="100%">
3 3
  <tr>
4
   <th class=listtop><TMPL_VAR NAME=title DEFAULT="<translate>Information</translate>"></th>
4
   <th class="listtop">[% IF title_information %][% title_information %][% ELSE %]<translate>Information</translate>[% END %]</th>
5 5
  </tr>
6 6
  <tr height="5"></tr>
7 7

  
8
  <tr><td><TMPL_VAR NAME=label_information></td></tr>
8
  <tr><td>[% label_information %]</td></tr>
9 9
 </table>
10 10

  
11
 <TMPL_VAR NAME=DEBUG>
12

  
13 11
</body>
14 12
</html>

Auch abrufbar als: Unified diff