1 <% include("/elements/header.html", "Edit $type2desc{$type} invoice template",
3 'View all invoice templates' => $p.'browse/invoice_template.html'
8 <FORM ACTION="process/invoice_template.html" METHOD="POST">
9 <INPUT TYPE="hidden" NAME="confname" VALUE="<% $confname %>">
11 % if ( $type eq 'html' ) {
13 <% include('/elements/htmlarea.html',
15 'curr_value' => $value,
22 <TEXTAREA NAME="value" ROWS=30 COLS=80 WRAP="off"><%$value |h %></TEXTAREA>
27 <INPUT TYPE="submit" VALUE="Change template">
31 <% include("/elements/footer.html") %>
37 'latex' => 'Print/PDF (typeset)',
38 'text' => 'Plaintext',
42 'html' => 'invoice_html',
43 'latex' => 'invoice_latex',
44 'text' => 'invoice_template',
51 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
53 my $type = $cgi->param('type');
54 my $name = $cgi->param('name');
55 my $suffix = $cgi->param('suffix');
57 #XXX type handling, just testing this out for now
59 my $conf = new FS::Conf;
61 my $value = length($name)
62 ? join("\n", $conf->config_orbase($type2base{$type}.$suffix, $name) )
63 : join("\n", $conf->config($type2base{$type}.$suffix) );
65 my $confname = length($name)
66 ? $type2base{$type}.$suffix. '_'. $name
67 : $type2base{$type}.$suffix;