$form->{path} entfernt und hardcodiert auf bin/mozilla gesetzt.
[kivitendo-erp.git] / bin / mozilla / pe.pl
1 #=====================================================================
2 # LX-Office ERP
3 # Copyright (C) 2004
4 # Based on SQL-Ledger Version 2.1.9
5 # Web http://www.lx-office.org
6 #
7 #=====================================================================
8 # SQL-Ledger Accounting
9 # Copyright (c) 1998-2002
10 #
11 #  Author: Dieter Simader
12 #   Email: dsimader@sql-ledger.org
13 #     Web: http://www.sql-ledger.org
14 #
15 #
16 # This program is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of the License, or
19 # (at your option) any later version.
20 #
21 # This program is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #======================================================================
29 #
30 # project administration
31 # partsgroup administration
32 #
33 #======================================================================
34
35 use SL::PE;
36
37 require "bin/mozilla/common.pl";
38
39 1;
40
41 # end of main
42
43 sub add {
44   $lxdebug->enter_sub();
45
46   $form->{title} = "Add";
47
48   # construct callback
49   $form->{callback} =
50     "$form->{script}?action=add&type=$form->{type}&login=$form->{login}&password=$form->{password}"
51     unless $form->{callback};
52
53   call_sub("form_$form->{type}_header");
54   call_sub("form_$form->{type}_footer");
55
56   $lxdebug->leave_sub();
57 }
58
59 sub edit {
60   $lxdebug->enter_sub();
61   # show history button
62   $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
63   #/show hhistory button
64   $form->{title} = "Edit";
65
66   if ($form->{type} eq 'project') {
67     PE->get_project(\%myconfig, \%$form);
68   }
69   if ($form->{type} eq 'partsgroup') {
70     PE->get_partsgroup(\%myconfig, \%$form);
71   }
72   if ($form->{type} eq 'pricegroup') {
73     PE->get_pricegroup(\%myconfig, \%$form);
74   }
75   call_sub("form_$form->{type}_header");
76   call_sub("form_$form->{type}_footer");
77
78   $lxdebug->leave_sub();
79 }
80
81 sub search {
82   $lxdebug->enter_sub();
83
84   if ($form->{type} eq 'project') {
85     $report        = "project_report";
86     $sort          = 'projectnumber';
87     $form->{title} = $locale->text('Projects');
88
89     $number = qq|
90         <tr>
91           <th align=right width=1%>| . $locale->text('Number') . qq|</th>
92           <td>| . $cgi->textfield('-name' => 'projectnumber', '-size' => 20) . qq|</td>
93         </tr>
94         <tr>
95           <th align=right>| . $locale->text('Description') . qq|</th>
96           <td>| . $cgi->textfield('-name' => 'description', '-size' => 60) . qq|</td>
97         </tr>
98   <tr>
99     <th>&nbsp;</th>
100     <td>| .
101     $cgi->radio_group('-name' => 'active', '-default' => 'active',
102                       '-values' => ['active', 'inactive', 'both'],
103                       '-labels' => { 'active' => ' ' . $locale->text("Active"),
104                                      'inactive' => ' ' . $locale->text("Inactive"),
105                                      'both' => ' ' . $locale->text("Both") })
106     . qq|</td>
107   </tr>
108 |;
109
110   }
111   if ($form->{type} eq 'partsgroup') {
112     $report        = "partsgroup_report";
113     $sort          = 'partsgroup';
114     $form->{title} = $locale->text('Groups');
115
116     $number = qq|
117         <tr>
118           <th align=right width=1%>| . $locale->text('Group') . qq|</th>
119           <td><input name=partsgroup size=20></td>
120         </tr>
121 |;
122
123   }
124
125   # for pricesgroups
126   if ($form->{type} eq 'pricegroup') {
127     $report        = "pricegroup_report";
128     $sort          = 'pricegroup';
129     $form->{title} = $locale->text('Pricegroup');
130
131     $number = qq|
132         <tr>
133           <th align=right width=1%>| . $locale->text('Pricegroup') . qq|</th>
134           <td><input name=pricegroup size=20></td>
135         </tr>
136 |;
137
138   }
139
140   $form->header;
141
142   print qq|
143 <body>
144
145 <form method=post action=$form->{script}>
146
147 <input type=hidden name=sort value=$sort>
148 <input type=hidden name=type value=$form->{type}>
149
150 <table width=100%>
151   <tr>
152     <th class=listtop>$form->{title}</th>
153   </tr>
154   <tr height="5"></tr>
155   <tr>
156     <td>
157       <table width=100%>
158         $number
159         <tr>
160           <td></td>
161           <td><input name=status class=radio type=radio value=all checked>&nbsp;|
162     . $locale->text('All') . qq|
163           <input name=status class=radio type=radio value=orphaned>&nbsp;|
164     . $locale->text('Orphaned') . qq|</td>
165         </tr>
166       </table>
167     </td>
168   </tr>
169   <tr>
170     <td><hr size=3 noshade></td>
171   </tr>
172 </table>
173
174 <input type=hidden name=nextsub value=$report>
175
176 <input type=hidden name=login value=$form->{login}>
177 <input type=hidden name=password value=$form->{password}>
178
179 <br>
180 <input class=submit type=submit name=action value="|
181     . $locale->text('Continue') . qq|">
182 </form>
183
184 </body>
185 </html>
186 |;
187
188   $lxdebug->leave_sub();
189 }
190
191 sub project_report {
192   $lxdebug->enter_sub();
193
194   map { $form->{$_} = $form->unescape($form->{$_}) }
195     (projectnumber, description);
196   PE->projects(\%myconfig, \%$form);
197
198   $callback =
199     "$form->{script}?action=project_report&type=$form->{type}&login=$form->{login}&password=$form->{password}&status=$form->{status}&active=" .
200     E($form->{active});
201   $href = $callback;
202
203   if ($form->{status} eq 'all') {
204     $option = $locale->text('All');
205   }
206   if ($form->{status} eq 'orphaned') {
207     $option .= $locale->text('Orphaned');
208   }
209   if ($form->{projectnumber}) {
210     $href     .= "&projectnumber=" . $form->escape($form->{projectnumber});
211     $callback .= "&projectnumber=$form->{projectnumber}";
212     $option   .=
213       "\n<br>" . $locale->text('Project') . " : $form->{projectnumber}";
214   }
215   if ($form->{description}) {
216     $href     .= "&description=" . $form->escape($form->{description});
217     $callback .= "&description=$form->{description}";
218     $option   .=
219       "\n<br>" . $locale->text('Description') . " : $form->{description}";
220   }
221
222   @column_index = qw(projectnumber description);
223
224   push(@column_index, "active") if ("both" eq $form->{active});
225
226   $column_header{projectnumber} =
227       qq|<th><a class=listheading href=$href&sort=projectnumber>|
228     . $locale->text('Number')
229     . qq|</a></th>|;
230   $column_header{description} =
231       qq|<th><a class=listheading href=$href&sort=description>|
232     . $locale->text('Description')
233     . qq|</a></th>|;
234   $column_header{active} =
235       qq|<th class="listheading">| . $locale->text('Active') . qq|</th>|;
236
237   $form->{title} = $locale->text('Projects');
238
239   $form->header;
240
241   print qq|
242 <body>
243
244 <table width=100%>
245   <tr>
246     <th class=listtop>$form->{title}</th>
247   </tr>
248   <tr height="5"></tr>
249   <tr>
250     <td>$option</td>
251   </tr>
252   <tr>
253     <td>
254       <table width=100%>
255         <tr class=listheading>
256 |;
257
258   map { print "$column_header{$_}\n" } @column_index;
259
260   print qq|
261         </tr>
262 |;
263
264   # escape callback
265   $form->{callback} = $callback .= "&sort=$form->{sort}";
266
267   # escape callback for href
268   $callback = $form->escape($callback);
269
270   foreach $ref (@{ $form->{project_list} }) {
271
272     $i++;
273     $i %= 2;
274
275     print qq|
276         <tr valign=top class=listrow$i>
277 |;
278
279     $column_data{projectnumber} =
280       qq|<td><a href=$form->{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{projectnumber}</td>|;
281     $column_data{description} = qq|<td>$ref->{description}&nbsp;</td>|;
282     $column_data{active} =
283       qq|<td>| .
284       ($ref->{active} ? $locale->text("Yes") : $locale->text("No")) .
285       qq|</td>|;
286
287     map { print "$column_data{$_}\n" } @column_index;
288
289     print "
290         </tr>
291 ";
292   }
293
294   print qq|
295       </table>
296     </td>
297   </tr>
298   <tr>
299     <td><hr size=3 noshade></td>
300   </tr>
301 </table>
302
303 <br>
304 <form method=post action=$form->{script}>
305
306 <input name=callback type=hidden value="$form->{callback}">
307
308 <input type=hidden name=type value=$form->{type}>
309
310 <input type=hidden name=login value=$form->{login}>
311 <input type=hidden name=password value=$form->{password}>
312
313 <input class=submit type=submit name=action value="|
314     . $locale->text('Add') . qq|">
315
316   </form>
317
318 </body>
319 </html>
320 |;
321
322   $lxdebug->leave_sub();
323 }
324
325 sub form_project_header {
326   $lxdebug->enter_sub();
327
328   $form->{title} = $locale->text("$form->{title} Project");
329
330   # $locale->text('Add Project')
331   # $locale->text('Edit Project')
332
333   $form->{description} =~ s/\"/&quot;/g;
334
335   my $projectnumber =
336     $cgi->textfield('-name' => 'projectnumber', '-size' => 20,
337                     '-default' => $form->{projectnumber});
338
339   my $description;
340   if (($rows = $form->numtextrows($form->{description}, 60)) > 1) {
341     $description =
342       $cgi->textarea('-name' => 'description', '-rows' => $rows, '-cols' => 60,
343                      '-style' => 'width: 100%', '-wrap' => 'soft',
344                      '-default' => $form->{description});
345   } else {
346     $description =
347       $cgi->textfield('-name' => 'description', '-size' => 60,
348                       '-default' => $form->{description});
349   }
350
351   my $active;
352   if ($form->{id}) {
353     $active =
354       qq|
355   <tr>
356     <th>&nbsp;</th>
357     <td>| .
358       $cgi->radio_group('-name' => 'active',
359                         '-values' => [1, 0],
360                         '-default' => $form->{active} * 1,
361                         '-labels' => { 1 => $locale->text("Active"),
362                                        0 => $locale->text("Inactive") })
363       . qq|</td>
364   </tr>
365 |;
366   }
367
368   $form->header;
369
370   print qq|
371 <body>
372
373 <form method=post action=$form->{script}>
374
375 <input type=hidden name=id value=$form->{id}>
376 <input type=hidden name=type value=project>
377
378 <table width=100%>
379   <tr>
380     <th class=listtop>$form->{title}</th>
381   </tr>
382   <tr height="5"></tr>
383   <tr>
384     <td>
385       <table>
386         <tr>
387           <th align=right>| . $locale->text('Number') . qq|</th>
388           <td>$projectnumber</td>
389         </tr>
390         <tr>
391           <th align=right>| . $locale->text('Description') . qq|</th>
392           <td>$description</td>
393         </tr>
394       $active
395       </table>
396     </td>
397   </tr>
398   <tr>
399     <td colspan=2><hr size=3 noshade></td>
400   </tr>
401 </table>
402 |;
403
404   $lxdebug->leave_sub();
405 }
406
407 sub form_project_footer {
408   $lxdebug->enter_sub();
409
410   print qq|
411
412 <input name=callback type=hidden value="$form->{callback}">
413
414 <input type=hidden name=login value=$form->{login}>
415 <input type=hidden name=password value=$form->{password}>
416
417 <br><input type=submit class=submit name=action value="|
418     . $locale->text('Save') . qq|">
419 |;
420
421   if ($form->{id} && $form->{orphaned}) {
422     print qq|
423 <input type=submit class=submit name=action value="|
424       . $locale->text('Delete') . qq|">|;
425   }
426
427 # button for saving history
428 print qq|
429         <input type=button onclick=set_history_window(|
430         . $form->{id} 
431         . qq|); name=history id=history value=|
432         . $locale->text('history') 
433         . qq|>|;
434 # /button for saving history
435   print qq|
436 </form>
437
438 </body>
439 </html>
440 |;
441
442   $lxdebug->leave_sub();
443 }
444
445 sub save {
446   $lxdebug->enter_sub();
447
448   if ($form->{type} eq 'project') {
449     $form->isblank("projectnumber", $locale->text('Project Number missing!'));
450     PE->save_project(\%myconfig, \%$form);
451     $form->redirect($locale->text('Project saved!'));
452   }
453   if ($form->{type} eq 'partsgroup') {
454     $form->isblank("partsgroup", $locale->text('Group missing!'));
455     PE->save_partsgroup(\%myconfig, \%$form);
456     $form->redirect($locale->text('Group saved!'));
457   }
458
459   # choice pricegroup and save
460   if ($form->{type} eq 'pricegroup') {
461     $form->isblank("pricegroup", $locale->text('Pricegroup missing!'));
462     PE->save_pricegroup(\%myconfig, \%$form);
463     $form->redirect($locale->text('Pricegroup saved!'));
464   }
465   # saving the history
466   if(!exists $form->{addition} && $form->{id} ne "") {
467     $form->{snumbers} = qq|projectnumber_| . $form->{projectnumber};
468         $form->{addition} = "SAVED";
469         $form->save_history($form->dbconnect(\%myconfig));
470   }
471   # /saving the history 
472
473   $lxdebug->leave_sub();
474 }
475
476 sub delete {
477   $lxdebug->enter_sub();
478
479   PE->delete_tuple(\%myconfig, \%$form);
480
481   if ($form->{type} eq 'project') {
482     $form->redirect($locale->text('Project deleted!'));
483   }
484   if ($form->{type} eq 'partsgroup') {
485     $form->redirect($locale->text('Group deleted!'));
486   }
487   if ($form->{type} eq 'pricegroup') {
488     $form->redirect($locale->text('Pricegroup deleted!'));
489   }
490   # saving the history
491   if(!exists $form->{addition}) {
492     $form->{snumbers} = qq|projectnumber_| . $form->{projectnumber};
493         $form->{addition} = "DELETED";
494         $form->save_history($form->dbconnect(\%myconfig));
495   }
496   # /saving the history
497   $lxdebug->leave_sub();
498 }
499
500 sub continue { call_sub($form->{"nextsub"}); }
501
502 sub partsgroup_report {
503   $lxdebug->enter_sub();
504
505   map { $form->{$_} = $form->unescape($form->{$_}) } (partsgroup);
506   PE->partsgroups(\%myconfig, \%$form);
507
508   $callback =
509     "$form->{script}?action=partsgroup_report&type=$form->{type}&login=$form->{login}&password=$form->{password}&status=$form->{status}";
510
511   if ($form->{status} eq 'all') {
512     $option = $locale->text('All');
513   }
514   if ($form->{status} eq 'orphaned') {
515     $option .= $locale->text('Orphaned');
516   }
517   if ($form->{partsgroup}) {
518     $callback .= "&partsgroup=$form->{partsgroup}";
519     $option   .= "\n<br>" . $locale->text('Group') . " : $form->{partsgroup}";
520   }
521
522   @column_index = $form->sort_columns(qw(partsgroup));
523
524   $column_header{partsgroup} =
525     qq|<th class=listheading width=90%>| . $locale->text('Group') . qq|</th>|;
526
527   $form->{title} = $locale->text('Groups');
528
529   $form->header;
530
531   print qq|
532 <body>
533
534 <table width=100%>
535   <tr>
536     <th class=listtop>$form->{title}</th>
537   </tr>
538   <tr height="5"></tr>
539   <tr>
540     <td>$option</td>
541   </tr>
542   <tr>
543     <td>
544       <table width=100%>
545         <tr class=listheading>
546 |;
547
548   map { print "$column_header{$_}\n" } @column_index;
549
550   print qq|
551         </tr>
552 |;
553
554   # escape callback
555   $form->{callback} = $callback;
556
557   # escape callback for href
558   $callback = $form->escape($callback);
559
560   foreach $ref (@{ $form->{item_list} }) {
561
562     $i++;
563     $i %= 2;
564
565     print qq|
566         <tr valign=top class=listrow$i>
567 |;
568
569     $column_data{partsgroup} =
570       qq|<td><a href=$form->{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{partsgroup}</td>|;
571     map { print "$column_data{$_}\n" } @column_index;
572
573     print "
574         </tr>
575 ";
576   }
577
578   print qq|
579       </table>
580     </td>
581   </tr>
582   <tr>
583     <td><hr size=3 noshade></td>
584   </tr>
585 </table>
586
587 <br>
588 <form method=post action=$form->{script}>
589
590 <input name=callback type=hidden value="$form->{callback}">
591
592 <input type=hidden name=type value=$form->{type}>
593
594 <input type=hidden name=login value=$form->{login}>
595 <input type=hidden name=password value=$form->{password}>
596
597 <input class=submit type=submit name=action value="|
598     . $locale->text('Add') . qq|">
599
600   </form>
601
602 </body>
603 </html>
604 |;
605
606   $lxdebug->leave_sub();
607 }
608
609 sub form_partsgroup_header {
610   $lxdebug->enter_sub();
611
612   $form->{title} = $locale->text("$form->{title} Group");
613
614   # $locale->text('Add Group')
615   # $locale->text('Edit Group')
616
617   $form->{partsgroup} =~ s/\"/&quot;/g;
618
619   $form->header;
620
621   print qq|
622 <body>
623
624 <form method=post action=$form->{script}>
625
626 <input type=hidden name=id value=$form->{id}>
627 <input type=hidden name=type value=$form->{type}>
628
629 <table width=100%>
630   <tr>
631     <th class=listtop>$form->{title}</th>
632   </tr>
633   <tr height="5"></tr>
634   <tr>
635     <td>
636       <table width=100%>
637         <tr>
638           <th align=right>| . $locale->text('Group') . qq|</th>
639
640           <td><input name=partsgroup size=30 value="$form->{partsgroup}"></td>
641         </tr>
642       </table>
643     </td>
644   </tr>
645   <tr>
646     <td colspan=2><hr size=3 noshade></td>
647   </tr>
648 </table>
649 |;
650
651   $lxdebug->leave_sub();
652 }
653
654 sub form_partsgroup_footer {
655   $lxdebug->enter_sub();
656
657   print qq|
658
659 <input name=callback type=hidden value="$form->{callback}">
660
661 <input type=hidden name=login value=$form->{login}>
662 <input type=hidden name=password value=$form->{password}>
663
664 <br><input type=submit class=submit name=action value="|
665     . $locale->text('Save') . qq|">
666 |;
667
668   if ($form->{id} && $form->{orphaned}) {
669     print qq|
670 <input type=submit class=submit name=action value="|
671       . $locale->text('Delete') . qq|">|;
672   }
673
674 # button for saving history
675 print qq|
676         <input type=button onclick=set_history_window(|
677         . $form->{id} 
678         . qq|); name=history id=history value=|
679         . $locale->text('history') 
680         . qq|>|;
681 # /button for saving history
682   print qq|
683 </form>
684
685 </body>
686 </html>
687 |;
688
689   $lxdebug->leave_sub();
690 }
691
692 #################################
693 # get pricesgroups and build up html-code
694 #
695 sub pricegroup_report {
696   $lxdebug->enter_sub();
697
698   map { $form->{$_} = $form->unescape($form->{$_}) } (pricegroup);
699   PE->pricegroups(\%myconfig, \%$form);
700
701   $callback =
702     "$form->{script}?action=pricegroup_report&type=$form->{type}&login=$form->{login}&password=$form->{password}&status=$form->{status}";
703
704   if ($form->{status} eq 'all') {
705     $option = $locale->text('All');
706   }
707   if ($form->{status} eq 'orphaned') {
708     $option .= $locale->text('Orphaned');
709   }
710   if ($form->{pricegroup}) {
711     $callback .= "&pricegroup=$form->{pricegroup}";
712     $option   .=
713       "\n<br>" . $locale->text('Pricegroup') . " : $form->{pricegroup}";
714   }
715
716   @column_index = $form->sort_columns(qw(pricegroup));
717
718   $column_header{pricegroup} =
719       qq|<th class=listheading width=90%>|
720     . $locale->text('Pricegroup')
721     . qq|</th>|;
722
723   $form->{title} = $locale->text('Pricegroup');
724
725   $form->header;
726
727   print qq|
728 <body>
729
730 <table width=100%>
731   <tr>
732     <th class=listtop>$form->{title}</th>
733   </tr>
734   <tr height="5"></tr>
735   <tr>
736     <td>$option</td>
737   </tr>
738   <tr>
739     <td>
740       <table width=100%>
741         <tr class=listheading>
742 |;
743
744   map { print "$column_header{$_}\n" } @column_index;
745
746   print qq|
747         </tr>
748 |;
749
750   # escape callback
751   $form->{callback} = $callback;
752
753   # escape callback for href
754   $callback = $form->escape($callback);
755
756   foreach $ref (@{ $form->{item_list} }) {
757
758     $i++;
759     $i %= 2;
760
761     print qq|
762         <tr valign=top class=listrow$i>
763 |;
764     $column_data{pricegroup} =
765       qq|<td><a href=$form->{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{pricegroup}</td>|;
766
767     map { print "$column_data{$_}\n" } @column_index;
768
769     print "
770         </tr>
771 ";
772   }
773
774   print qq|
775       </table>
776     </td>
777   </tr>
778   <tr>
779     <td><hr size=3 noshade></td>
780   </tr>
781 </table>
782
783 <br>
784 <form method=post action=$form->{script}>
785
786 <input name=callback type=hidden value="$form->{callback}">
787
788 <input type=hidden name=type value=$form->{type}>
789
790 <input type=hidden name=login value=$form->{login}>
791 <input type=hidden name=password value=$form->{password}>
792
793 <input class=submit type=submit name=action value="|
794     . $locale->text('Add') . qq|">
795
796   </form>
797
798 </body>
799 </html>
800 |;
801
802   $lxdebug->leave_sub();
803 }
804
805 #######################
806 #build up pricegroup_header
807 #
808 sub form_pricegroup_header {
809   $lxdebug->enter_sub();
810
811   # $locale->text('Add Pricegroup')
812   # $locale->text('Edit Pricegroup')
813
814   $form->{title} = $locale->text("$form->{title} Pricegroup");
815
816   $form->{pricegroup} =~ s/\"/&quot;/g;
817
818   $form->header;
819
820   print qq|
821 <body>
822
823 <form method=post action=$form->{script}>
824
825 <input type=hidden name=id value=$form->{id}>
826 <input type=hidden name=type value=$form->{type}>
827
828 <table width=100%>
829   <tr>
830     <th class=listtop>$form->{title}</th>
831   </tr>
832   <tr height="5"></tr>
833   <tr>
834     <td>
835       <table width=100%>
836         <tr>
837           <th align=right>| . $locale->text('Preisgruppe') . qq|</th>
838           <td><input name=pricegroup size=30 value="$form->{pricegroup}"></td>
839         </tr>
840       </table>
841     </td>
842   </tr>
843   <tr>
844     <td colspan=2><hr size=3 noshade></td>
845   </tr>
846 </table>
847 |;
848
849   $lxdebug->leave_sub();
850 }
851 ######################
852 #build up pricegroup_footer
853 #
854 sub form_pricegroup_footer {
855   $lxdebug->enter_sub();
856
857   print qq|
858
859 <input name=callback type=hidden value="$form->{callback}">
860
861 <input type=hidden name=login value=$form->{login}>
862 <input type=hidden name=password value=$form->{password}>
863
864 <br><input type=submit class=submit name=action value="|
865     . $locale->text('Save') . qq|">
866 |;
867
868   if ($form->{id} && $form->{orphaned}) {
869     print qq|
870 <input type=submit class=submit name=action value="|
871       . $locale->text('Delete') . qq|">|;
872   }
873
874 # button for saving history
875 print qq|
876         <input type=button onclick=set_history_window(|
877         . $form->{id} 
878         . qq|); name=history id=history value=|
879         . $locale->text('history') 
880         . qq|>|;
881 # /button for saving history
882   print qq|
883 </form>
884
885 </body>
886 </html>
887 |;
888
889   $lxdebug->leave_sub();
890 }