event refactor, landing on HEAD!
[freeside.git] / httemplate / edit / part_pkg.cgi
index a84fafa..90e328d 100755 (executable)
@@ -89,7 +89,10 @@ Package information
       <INPUT TYPE="text" NAME="comment" SIZE=32 VALUE="<%$part_pkg->comment%>">
     </TD>
   </TR>
-  <% include( '/elements/tr-select-pkg_class.html', $part_pkg->classnum ) %>
+  <% include( '/elements/tr-select-pkg_class.html',
+                'curr_value' => $part_pkg->classnum,
+            )
+  %>
   <TR>
     <TD ALIGN="right">Promotional code</TD>
     <TD>
@@ -159,7 +162,7 @@ Line-item revenue recognition
 
 </TD><TD VALIGN="top">
 
-Reseller information
+Reseller information 
 <% ntable("#cccccc", 2) %>
   <TR>
     <TD ALIGN="right"><% 'Agent Types' %></TD>
@@ -290,7 +293,7 @@ Reseller information
 %  'form_action'    => 'process/part_pkg.cgi',
 %  'form_elements'  => \@form_elements,
 %  'form_text'      => [ qw(pkg comment promo_code clone pkgnum pkgpart),
-%                        qw(pay_weight credit_weight),
+%                        qw(pay_weight credit_weight), #keys(%weight),
 %                        @fixups,
 %                      ],
 %  'form_checkbox'  => [ qw(setuptax recurtax disabled) ],
@@ -323,10 +326,12 @@ Reseller information
 %
 %      $html .= '<TR><TD ALIGN="right">'. $href->{$field}{'name'}. '</TD><TD>';
 %
+%      my $format = sub { shift };
+%      $format = $href->{$field}{'format'} if exists($href->{$field}{'format'});
 %      if ( ! exists($href->{$field}{'type'}) ) {
 %        $html .= qq!<INPUT TYPE="text" NAME="$field" VALUE="!.
 %                 ( exists($plandata{$field})
-%                     ? $plandata{$field}
+%                     ? &$format($plandata{$field})
 %                     : $href->{$field}{'default'} ).
 %                 qq!">!;
 %      } elsif ( $href->{$field}{'type'} eq 'checkbox' ) {