X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=d75766a3fcb1da47b2f4ebe319ab90f4aefc6b7b;hb=95cac184a6de349b26599dcaf0e42feba2ef6222;hp=b41b0ec9927034a13f40834c928a2aa1bbf8b69b;hpb=4dbb09950c9f5596646537c12d991c99086fe7c1;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index b41b0ec99..d75766a3f 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -31,50 +31,43 @@ # #====================================================================== - use SL::AM; use SL::CA; use SL::Form; use SL::User; - 1; -# end of main - - - -sub add { &{ "add_$form->{type}" } }; -sub edit { &{ "edit_$form->{type}" } }; -sub save { &{ "save_$form->{type}" } }; -sub delete { &{ "delete_$form->{type}" } }; - +# 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_account { $lxdebug->enter_sub(); - - $form->{title} = "Add"; + $form->{title} = "Add"; $form->{charttype} = "A"; AM->get_account(\%myconfig, \%$form); - - $form->{callback} = "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}" unless $form->{callback}; + + $form->{callback} = + "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}" + unless $form->{callback}; &account_header; &form_footer; - + $lxdebug->leave_sub(); } - sub edit_account { $lxdebug->enter_sub(); - $form->{title} = "Edit"; AM->get_account(\%myconfig, \%$form); - + foreach my $item (split(/:/, $form->{link})) { $form->{$item} = "checked"; } @@ -85,122 +78,171 @@ sub edit_account { $lxdebug->leave_sub(); } - sub account_header { $lxdebug->enter_sub(); - $form->{title} = $locale->text("$form->{title} Account"); - - $checked{$form->{charttype}} = "checked"; + + $checked{ $form->{charttype} } = "checked"; $checked{"$form->{category}_"} = "checked"; $checked{CT_tax} = ($form->{CT_tax}) ? "" : "checked"; - + $form->{description} =~ s/\"/"/g; - - if (@{ $form->{TAXKEY} }) { - $form->{selecttaxkey} = "