input and output on data volume fields specified with k,m,g,or t
[freeside.git] / httemplate / edit / part_pkg.cgi
index ce3e854..bdd3f30 100755 (executable)
@@ -323,10 +323,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' ) {