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' ) {
12 % if ( 0 ) { #this seems to broken, using a text editor for everything for now
14 <% include('/elements/htmlarea.html',
16 'curr_value' => $value,
23 <TEXTAREA NAME="value" ROWS=30 COLS=80 WRAP="off"><%$value |h %></TEXTAREA>
28 <INPUT TYPE="submit" VALUE="Change template">
32 <% include("/elements/footer.html") %>
38 'latex' => 'Print/PDF (typeset)',
39 'text' => 'Plaintext',
43 'html' => 'invoice_html',
44 'latex' => 'invoice_latex',
45 'text' => 'invoice_template',
52 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
54 my $type = $cgi->param('type');
55 my $name = $cgi->param('name');
56 my $suffix = $cgi->param('suffix');
58 #XXX type handling, just testing this out for now
60 my $conf = new FS::Conf;
62 my $value = length($name)
63 ? join("\n", $conf->config_orbase($type2base{$type}.$suffix, $name) )
64 : join("\n", $conf->config($type2base{$type}.$suffix) );
66 my $confname = length($name)
67 ? $type2base{$type}.$suffix. '_'. $name
68 : $type2base{$type}.$suffix;