sub display_template {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->{edit} = 0;
display_template_form();
sub edit_template {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->{edit} = 1;
display_template_form();
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);
sub display_template_form {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->{"formname"} =~ s|.*/||;
my $format = $form->{"format"} eq "html" ? "html" : "tex";
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;
$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();
}