Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / edit / process / elements / svc_Common.html
index 8e8c99a..06f4c00 100644 (file)
@@ -1,15 +1,19 @@
-%
-%
-%  my %opt = @_;
-%  my $table = $opt{'table'};
-%  $opt{'fields'} ||= [ fields($table) ];
-%  push @{ $opt{'fields'} }, qw( pkgnum svcpart );
-%
-%
 <% include( 'process.html',
                  'edit_ext' => 'cgi',
                  'redirect' => popurl(3)."view/$table.cgi?",
                  %opt,
            )
 %>
+<%init>
 
+my %opt = @_;
+my $table = $opt{'table'};
+$opt{'fields'} ||= [ fields($table) ];
+push @{ $opt{'fields'} }, qw( pkgnum svcpart );
+foreach (fields($table)) {
+  if ( $cgi->param($_.'_classnum') ) {
+    push @{ $opt{'fields'} }, $_.'_classnum';
+  }
+}
+
+</%init>