event refactor, landing on HEAD!
[freeside.git] / httemplate / elements / select-pkg_class.html
index 032c7ab..f30259e 100644 (file)
@@ -1,17 +1,18 @@
-<%
-  my( $classnum, %opt ) = @_;
-
-  $opt{'records'} = delete $opt{'pkg_class'}
-    if $opt{'pkg_class'};
-
-  #warn "***** select-pkg-class: \n". Dumper(%opt);
-
-%><%= include( '/elements/select-table.html',
+<% include( '/elements/select-table.html',
                  'table'       => 'pkg_class',
                  'name_col'    => 'classname',
                  'value'       => $classnum,
                  'empty_label' => '(none)',
-                 #'hashref'     => { 'disabled' => '' },
+                 'hashref'     => { 'disabled' => '' },
                  %opt,
              )
 %>
+<%init>
+
+my %opt = @_;
+my $classnum = $opt{'curr_value'} || $opt{'value'};
+
+$opt{'records'} = delete $opt{'pkg_class'}
+  if $opt{'pkg_class'};
+
+</%init>