X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Famtemplates.pl;h=1ef16c1eba371e726da90865e534a22156efecb2;hb=47eb3e455046c41ba2ad1c14bee85bb98ffb3244;hp=61877259abfdef08375c86814bacab7379013dc8;hpb=b9882bee823f393f2071c790c1d73407c7d8ea51;p=kivitendo-erp.git diff --git a/bin/mozilla/amtemplates.pl b/bin/mozilla/amtemplates.pl index 61877259a..1ef16c1eb 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; @@ -221,7 +229,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(); }