blob: 8755bed5614dd0b1bc46688dc899bc07c16480fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<& elements/process.html,
'table' => 'upload_target',
'viewall_dir' => 'browse',
'agent_null' => 1,
'precheck_callback'=> \&precheck,
&>
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
die "access denied"
unless $curuser->access_right('Configuration');
sub precheck {
my $cgi = shift;
my $protocol = $cgi->param('protocol');
# promote whatever set of fields was selected to the "real" values
my $params = $cgi->Vars;
foreach ( keys %$params ) {
if ( $_ =~ /^${protocol}_(\w+)/ ) {
$cgi->param($1, $cgi->param($_));
}
}
}
</%init>
|