X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Famtemplates.pl;h=9843f82b1eae32fb8e4906b2f5769f7fd0cbced4;hb=ea2e84cc75e2879141eea5e957439936280682bf;hp=72e6500cba696404dc934100a9e0d5878d571fa0;hpb=9aaca43317d3ea33d80a308cab7ce4c20d732a16;p=kivitendo-erp.git diff --git a/bin/mozilla/amtemplates.pl b/bin/mozilla/amtemplates.pl index 72e6500cb..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);