X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/ab18ac36133d48a5c38026bff01f3733d8638db8..b12e8d1411cb7af3a1a9b6f7637692f0758b4741:/bin/mozilla/am.pl diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 276a2dafe..e34957f94 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -47,10 +47,32 @@ require "$form->{path}/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 display { + if ($form->{display_nextsub}) { + &{ $form->{display_nextsub} }(); + } else { + &{ $form->{nextsub} }(); + } +} + +sub save { + if ($form->{save_nextsub}) { + &{ $form->{save_nextsub} }(); + } else { + &{ $form->{nextsub} }(); + } +} + +sub edit { + if ($form->{edit_nextsub}) { + &{ $form->{edit_nextsub} }(); + } else { + &{ "edit_$form->{type}" }(); + } +} + sub add_account { $lxdebug->enter_sub(); @@ -1115,9 +1137,7 @@ sub list_business { $discount = $form->format_amount(\%myconfig, $ref->{discount} * 100); $description = - ($ref->{salesman}) - ? "$ref->{description}" - : "$ref->{description}"; + $ref->{description}; $column_data{description} = qq|
\n$form->{body}\n"; + my ($filename) = AM->prepare_template_filename(\%myconfig, $form); + if (my $error = AM->save_template($filename, $form->{content})) { + $form->error(sprintf($locale->text("Saving the file '%s' failed. OS error message: %s"), $filename, $error)); } - $form->header; + $form->{edit} = 0; + display_template_form(); - print qq| - + $lxdebug->leave_sub(); +} -$form->{body} +sub display_template_form { + $lxdebug->enter_sub(); - + if (($form->{type} ne "stylesheet") && !$form->{edit}) { + $edit_options = "
"; - -