RT# 82949 - changes section name from fees to pricing, better opiton
[freeside.git] / httemplate / edit / process / upload_target.html
1 <& elements/process.html,
2            'table'            => 'upload_target',
3            'viewall_dir'      => 'browse',
4            'agent_null'       => 1,
5            'precheck_callback'=> \&precheck,
6 &>
7 <%init>
8 my $curuser = $FS::CurrentUser::CurrentUser;
9
10 die "access denied"
11   unless $curuser->access_right('Configuration');
12
13 sub precheck {
14   my $cgi = shift;
15   my $protocol = $cgi->param('protocol');
16   # promote whatever set of fields was selected to the "real" values
17   my $params = $cgi->Vars;
18   foreach ( keys %$params ) {
19     if ( $_ =~ /^${protocol}_(\w+)/ ) {
20       $cgi->param($1, $cgi->param($_));
21     }
22   }
23
24   ''; #no error
25 }
26
27 </%init>