1 <% include( 'process.html',
3 'redirect' => popurl(3)."view/$table.cgi?",
4 'args_callback' => $args_callback,
11 my $table = $opt{'table'};
12 $opt{'fields'} ||= [ fields($table) ];
13 push @{ $opt{'fields'} }, qw( pkgnum svcpart );
14 push @{ $opt{'fields'} }, @{ "FS::$table"->table_info->{'addl_process_fields'} }
15 if UNIVERSAL::can("FS::$table", 'table_info')
16 && "FS::$table"->table_info->{'addl_process_fields'};
17 foreach (fields($table)) {
18 if ( $cgi->param($_.'_classnum') ) {
19 push @{ $opt{'fields'} }, $_.'_classnum';
23 my $args_callback = sub {
25 my $part_svc = FS::part_svc->by_key($cgi->param('svcpart'))
26 or die "svcpart required";
27 if ( $part_svc->has_router ) {
28 my $router = FS::router->new({
29 map { $_ => scalar($cgi->param("router_$_")) }
30 qw( routernum routername blocknum )
32 if ($router->blocknum and length($router->routername) == 0) {
34 $router->set('routername', $svc->label);
36 return (child_objects => [ $router ]);