fix time worked search when someone edits a value back to blank
[freeside.git] / httemplate / edit / part_svc.cgi
index 97e2d96..964e088 100755 (executable)
@@ -15,20 +15,7 @@ Service  <INPUT TYPE="text" NAME="svc" VALUE="<% $hashref->{svc} %>"><BR>
 
 <BR>
 
-
-% #YUCK.  false laziness w/part_svc.pm.  go away virtual fields, please
 % my %vfields;
-% foreach my $svcdb ( FS::part_svc->svc_tables() ) {
-%   eval "use FS::$svcdb;";
-%   my $self = "FS::$svcdb"->new;
-%   $vfields{$svcdb} = {};
-%   foreach my $field ($self->virtual_fields) { # svc_Common::virtual_fields with a null svcpart returns all of them
-%     my $pvf = $self->pvf($field);
-%     $vfields{$svcdb}->{$field} = $pvf;
-%     #warn "\$vfields{$svcdb}->{$field} = $pvf";
-%   } #next $field
-% } #next $svcdb
-%
 %  #code duplication w/ edit/part_svc.cgi, should move this hash to part_svc.pm
 %  # and generalize the subs
 %  # condition sub is tested to see whether to disable display of this choice
@@ -314,32 +301,15 @@ Service  <INPUT TYPE="text" NAME="svc" VALUE="<% $hashref->{svc} %>"><BR>
 %            qq!<TEXTAREA NAME="${layer}__${field}">!. encode_entities($value).
 %            '</TEXTAREA>';
 %
-%        } elsif ( $def->{type} eq 'select-svc_pbx.html' ) {
-%
-%          $html .= include('/elements/select-svc_pbx.html',
-%                             'curr_value'   => $value,
-%                             'element_name' => "${layer}__${field}",
-%                             'element_etc'  => $disabled,
-%                             'multiple'     => ($flag eq 'S'),
-%                          );
-%
-%        } elsif ( $def->{type} eq 'select-lnp_status.html' ) {
+%        } elsif ( $def->{type} =~ /select-(.*?).html/ ) {
 %
-%          $html .= include('/elements/select-lnp_status.html',
+%          $html .= include("/elements/".$def->{type},
 %                             'curr_value'   => $value,
 %                             'element_name' => "${layer}__${field}",
 %                             'element_etc'  => $disabled,
 %                             'multiple'     => ($flag eq 'S'),
 %                          );
 %
-%        } elsif ( $def->{type} eq 'radius_usergroup_selector' ) {
-%
-%          #XXX disable the RADIUS usergroup selector?  ugh it sure does need
-%          #an overhaul, people have dum group problems because of it
-%
-%          $html .= FS::svc_acct::radius_usergroup_selector(
-%            [ split(',', $value) ], "${layer}__${field}" );
-%
 %        } elsif ( $def->{type} eq 'communigate_pro-accessmodes' ) {
 %
 %          $html .= include('/elements/communigate_pro-accessmodes.html',