2 'post_url' => popurl(1).'process/ftp_target.html',
3 'name' => 'FTP target',
4 'table' => 'ftp_target',
5 'viewall_url' => "${p}browse/ftp_target.html",
6 'labels' => { targetnum => 'Target',
8 username => 'Username',
9 password => 'Password',
13 handling => 'Special handling',
16 { field => 'hostname', size => 40 },
17 { field => 'port', size => 8 },
18 { field => 'secure', type => 'checkbox', value => 'Y' },
21 { field => 'path', size => 40 },
22 { field => 'handling',
24 options => [ FS::ftp_target->handling_types ],
27 'menubar' => \@menubar,
28 'edit_callback' => $edit_callback,
32 my $curuser = $FS::CurrentUser::CurrentUser;
35 unless $curuser->access_right('Configuration');
37 my @menubar = ('View all FTP targets' => $p.'browse/ftp_target.html');
38 my $edit_callback = sub {
39 my ($cgi, $object) = @_;
40 if ( $object->targetnum ) {
41 push @menubar, 'Delete this target',
42 $p.'misc/delete-ftp_target.html?'.$object->targetnum;