X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fam.pl;h=ca1ee4c0d89b75ed1b3fcf9f4a17b198a20ae3a3;hb=4f3393f4faf9b531d48bb97056468eaf5d0676c8;hp=0ce8c2ee6d371106e68626fec8b151b91b757a06;hpb=0acf0e35540578a0802d660ede4f338afc0a6aa5;p=kivitendo-erp.git
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index 0ce8c2ee6..ca1ee4c0d 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -40,16 +40,15 @@ use Data::Dumper;
1;
-
-
-require "$form->{path}/common.pl";
+require "bin/mozilla/common.pl";
# end of main
-sub add { &{"add_$form->{type}"} }
-sub edit { &{"edit_$form->{type}"} }
-sub save { &{"save_$form->{type}"} }
-sub delete { &{"delete_$form->{type}"} }
+sub add { call_sub("add_$form->{type}"); }
+sub delete { call_sub("delete_$form->{type}"); }
+sub save { call_sub("save_$form->{type}"); }
+sub edit { call_sub("edit_$form->{type}"); }
+sub continue { call_sub($form->{"nextsub"}); }
sub add_account {
$lxdebug->enter_sub();
@@ -59,7 +58,7 @@ sub add_account {
AM->get_account(\%myconfig, \%$form);
$form->{callback} =
- "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=list_account&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
&account_header;
@@ -486,7 +485,6 @@ sub form_footer {
-{path}>
{login}>
{password}>
@@ -535,7 +533,7 @@ sub list_account {
# construct callback
$callback =
- "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ "$form->{script}?action=list_account&login=$form->{login}&password=$form->{password}";
$form->header;
@@ -600,7 +598,7 @@ sub list_account {
$ca->{link_edit_account} =
qq|$form->{script}?action=edit_account&id=$ca->{id}|
- .qq|&path=$form->{path}&login=$form->{login}|
+ .qq|&login=$form->{login}|
.qq|&password=$form->{password}&callback=$callback|;
}
@@ -645,7 +643,7 @@ sub add_department {
$form->{role} = "P";
$form->{callback} =
- "$form->{script}?action=add_department&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add_department&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
&department_header;
@@ -673,7 +671,7 @@ sub list_department {
AM->departments(\%myconfig, \%$form);
$form->{callback} =
- "$form->{script}?action=list_department&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ "$form->{script}?action=list_department&login=$form->{login}&password=$form->{password}";
$callback = $form->escape($form->{callback});
@@ -729,7 +727,7 @@ sub list_department {
$profitcenter = ($ref->{role} eq "P") ? "X" : "";
$column_data{description} =
- qq|
{script}?action=edit_department&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description} | |;
+ qq|{script}?action=edit_department&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description} | |;
$column_data{cost} = qq|$costcenter | |;
$column_data{profit} = qq|$profitcenter | |;
@@ -756,7 +754,6 @@ sub list_department {
-{path}>
{login}>
{password}>
@@ -853,7 +850,7 @@ sub add_lead {
$form->{title} = "Add";
$form->{callback} =
- "$form->{script}?action=add_lead&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add_lead&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
&lead_header;
@@ -883,7 +880,7 @@ sub list_lead {
AM->lead(\%myconfig, \%$form);
$form->{callback} =
- "$form->{script}?action=list_lead&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ "$form->{script}?action=list_lead&login=$form->{login}&password=$form->{password}";
$callback = $form->escape($form->{callback});
@@ -927,7 +924,7 @@ sub list_lead {
$lead = $ref->{lead};
$column_data{description} =
- qq|{script}?action=edit_lead&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{lead} | |;
+ qq|{script}?action=edit_lead&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{lead} | |;
map { print "$column_data{$_}\n" } @column_index;
@@ -949,7 +946,6 @@ sub list_lead {
-{path}>
{login}>
{password}>
@@ -1030,7 +1026,7 @@ sub add_business {
$form->{title} = "Add";
$form->{callback} =
- "$form->{script}?action=add_business&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add_business&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
&business_header;
@@ -1060,7 +1056,7 @@ sub list_business {
AM->business(\%myconfig, \%$form);
$form->{callback} =
- "$form->{script}?action=list_business&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ "$form->{script}?action=list_business&login=$form->{login}&password=$form->{password}";
$callback = $form->escape($form->{callback});
@@ -1117,7 +1113,7 @@ sub list_business {
$description =
$ref->{description};
$column_data{description} =
- qq|{script}?action=edit_business&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$description | |;
+ qq|{script}?action=edit_business&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$description | |;
$column_data{discount} = qq|$discount | |;
$column_data{customernumberinit} =
qq|$ref->{customernumberinit} | |;
@@ -1145,7 +1141,6 @@ sub list_business {
-{path}>
{login}>
{password}>
@@ -1234,7 +1229,7 @@ sub add_language {
$form->{title} = "Add";
$form->{callback} =
- "$form->{script}?action=add_language&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add_language&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
&language_header;
@@ -1264,7 +1259,7 @@ sub list_language {
AM->language(\%myconfig, \%$form);
$form->{callback} =
- "$form->{script}?action=list_language&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ "$form->{script}?action=list_language&login=$form->{login}&password=$form->{password}";
$callback = $form->escape($form->{callback});
@@ -1330,7 +1325,7 @@ sub list_language {
$column_data{description} =
- qq|{script}?action=edit_language&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description} | |;
+ qq|{script}?action=edit_language&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description} | |;
$column_data{template_code} = qq|$ref->{template_code} | |;
$column_data{article_code} =
qq|$ref->{article_code} | |;
@@ -1372,7 +1367,6 @@ sub list_language {
-{path}>
{login}>
{password}>
@@ -1506,7 +1500,7 @@ sub add_buchungsgruppe {
$form->{title} = "Add";
$form->{callback} =
- "$form->{script}?action=add_buchungsgruppe&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add_buchungsgruppe&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
AM->get_buchungsgruppe(\%myconfig, \%$form);
$form->{"inventory_accno_id"} = $form->{"std_inventory_accno_id"};
@@ -1541,7 +1535,7 @@ sub list_buchungsgruppe {
AM->buchungsgruppe(\%myconfig, \%$form);
$form->{callback} =
- "$form->{script}?action=list_buchungsgruppe&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ "$form->{script}?action=list_buchungsgruppe&login=$form->{login}&password=$form->{password}";
$callback = $form->escape($form->{callback});
@@ -1625,7 +1619,7 @@ sub list_buchungsgruppe {
my $swap_link = qq|$form->{script}?action=swap_buchungsgruppen&|;
map({ $swap_link .= $_ . "=" . $form->escape($form->{$_}) . "&" }
- qw(login password path));
+ qw(login password));
my $row = 0;
foreach $ref (@{ $form->{ALL} }) {
@@ -1660,7 +1654,7 @@ sub list_buchungsgruppe {
}
$column_data{description} =
- qq|{script}?action=edit_buchungsgruppe&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description} | |;
+ qq|{script}?action=edit_buchungsgruppe&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description} | |;
$column_data{inventory_accno} = qq|$ref->{inventory_accno} | |;
$column_data{income_accno_0} =
qq|$ref->{income_accno_0} | |;
@@ -1700,7 +1694,6 @@ sub list_buchungsgruppe {
-{path}>
{login}>
{password}>
@@ -1892,7 +1885,7 @@ sub add_printer {
$form->{title} = "Add";
$form->{callback} =
- "$form->{script}?action=add_printer&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add_printer&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
&printer_header;
@@ -1922,7 +1915,7 @@ sub list_printer {
AM->printer(\%myconfig, \%$form);
$form->{callback} =
- "$form->{script}?action=list_printer&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ "$form->{script}?action=list_printer&login=$form->{login}&password=$form->{password}";
$callback = $form->escape($form->{callback});
@@ -1976,7 +1969,7 @@ sub list_printer {
$column_data{printer_description} =
- qq|{script}?action=edit_printer&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{printer_description} | |;
+ qq|{script}?action=edit_printer&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{printer_description} | |;
$column_data{printer_command} = qq|$ref->{printer_command} | |;
$column_data{template_code} =
qq|$ref->{template_code} | |;
@@ -2004,7 +1997,6 @@ sub list_printer {
-{path}>
{login}>
{password}>
@@ -2094,7 +2086,7 @@ sub add_payment {
$form->{title} = "Add";
$form->{callback} =
- "$form->{script}?action=add_payment&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add_payment&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
$form->{terms_netto} = 0;
@@ -2264,7 +2256,6 @@ sub list_payment {
-{path}>
{login}>
{password}>
@@ -2412,114 +2403,6 @@ sub swap_payment_terms {
$lxdebug->leave_sub();
}
-sub display_stylesheet {
- $lxdebug->enter_sub();
-
- $form->{file} = "css/$myconfig{stylesheet}";
- &display_form;
-
- $lxdebug->leave_sub();
-}
-
-sub display_form {
- $lxdebug->enter_sub();
-
- $form->{file} =~ s/^(.:)*?\/|\.\.\///g;
- $form->{file} =~ s/^\/*//g;
- $form->{file} =~ s/$userspath//;
-
- $form->error("$!: $form->{file}") unless -f $form->{file};
-
- AM->load_template(\%$form);
-
- $form->{title} = $form->{file};
-
- # if it is anything but html
- if ($form->{file} !~ /\.html$/) {
- $form->{body} = "\n$form->{body}\n
";
- }
-
- $form->header;
-
- print qq|
-
-
-$form->{body}
-
-
-
-
-