X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Famtemplates.pl;h=9843f82b1eae32fb8e4906b2f5769f7fd0cbced4;hb=2e7983737542b36d9962073a7d04f2edcf6b8bb0;hp=61877259abfdef08375c86814bacab7379013dc8;hpb=b9882bee823f393f2071c790c1d73407c7d8ea51;p=kivitendo-erp.git diff --git a/bin/mozilla/amtemplates.pl b/bin/mozilla/amtemplates.pl index 61877259a..9843f82b1 100644 --- a/bin/mozilla/amtemplates.pl +++ b/bin/mozilla/amtemplates.pl @@ -57,6 +57,8 @@ sub edit { sub display_template { $lxdebug->enter_sub(); + $auth->assert('config'); + $form->{edit} = 0; display_template_form(); @@ -66,6 +68,8 @@ sub display_template { sub edit_template { $lxdebug->enter_sub(); + $auth->assert('config'); + $form->{edit} = 1; display_template_form(); @@ -75,6 +79,8 @@ sub edit_template { sub save_template { $lxdebug->enter_sub(); + $auth->assert('config'); + $form->isblank("formname", $locale->text("You're not editing a file.")) unless ($form->{type} eq "stylesheet"); my ($filename) = AM->prepare_template_filename(\%myconfig, $form); @@ -91,6 +97,8 @@ sub save_template { sub display_template_form { $lxdebug->enter_sub(); + $auth->assert('config'); + $form->{"formname"} =~ s|.*/||; my $format = $form->{"format"} eq "html" ? "html" : "tex"; @@ -98,7 +106,7 @@ sub display_template_form { my %options; - my @hidden = qw(login password type format); + my @hidden = qw(type format); if (($form->{"type"} ne "stylesheet") && !$form->{"edit"}) { $options{"SHOW_EDIT_OPTIONS"} = 1; @@ -155,7 +163,9 @@ sub display_template_form { push(@values, { "value" => $ref->{"template"}, - "label" => $locale->text('Payment Reminder') . ": " . $ref->{"dunning_description"} }); + "label" => $locale->text('Payment Reminder') . ": " . $ref->{"dunning_description"} }, + { "value" => $ref->{"template"} . "_invoice", + "label" => $locale->text('Payment Reminder') . ": " . $ref->{"dunning_description"} . ' (' . $locale->text("Invoice for fees") . ')' }); } @values = sort({ $a->{"label"} cmp $b->{"label"} } @values); @@ -221,7 +231,7 @@ sub display_template_form { $options{"HIDDEN"} = [ map(+{ "name" => $_, "value" => $form->{$_} }, @hidden) ]; $form->header; - print($form->parse_html_template2("am/edit_templates", \%options)); + print($form->parse_html_template("am/edit_templates", \%options)); $lxdebug->leave_sub(); }