minor fixes to deploy zone editing, #30260
[freeside.git] / httemplate / edit / process / elements / svc_Common.html
index e1b7cbe..ca336a1 100644 (file)
@@ -11,6 +11,9 @@ my %opt = @_;
 my $table = $opt{'table'};
 $opt{'fields'} ||= [ fields($table) ];
 push @{ $opt{'fields'} }, qw( pkgnum svcpart );
+push @{ $opt{'fields'} }, @{ "FS::$table"->table_info->{'addl_process_fields'} }
+  if UNIVERSAL::can("FS::$table", 'table_info')
+  && "FS::$table"->table_info->{'addl_process_fields'};
 foreach (fields($table)) {
   if ( $cgi->param($_.'_classnum') ) {
     push @{ $opt{'fields'} }, $_.'_classnum';
@@ -26,7 +29,7 @@ my $args_callback = sub {
       map { $_ => $cgi->param("router_$_") }
       qw( routernum routername blocknum )
     });
-   if (length($router->routername) == 0) {
+   if ($router->blocknum and length($router->routername) == 0) {
       #sensible default
       $router->set('routername', $svc->label);
     }