!.
% ( $def->{'label'} || $field ).
% " ";
%
% $html .= qq! ';
%
% $flag = '' if $def->{type} eq 'disabled';
%
% $html .= qq!!;
%
% if ( $def->{type} eq 'disabled' ) {
%
% $html .= 'No default';
%
% } else {
%
% $html .= qq!!;
%
% foreach my $f ( keys %flag ) {
%
% # need to template-ize more httemplate/edit/svc_* first
% next if $f eq 'M' and $layer !~ /^svc_(broadband|external|phone)$/;
%
% #here is where the SUB from above is called, to skip some choices
% next if $flag{$f}->{condition}
% && &{ $flag{$f}->{condition} }( $def, $layer, $field );
%
% $html .= qq!'. $flag{$f}->{desc};
%
% }
%
% $html .= ' ';
%
% $html .= join("\n",
% '',
% );
%
% }
%
% $html .= qq! !;
%
% my $disabled = $flag ? ''
% : 'DISABLED STYLE="background-color: #dddddd"';
%
% if ( !$def->{type} || $def->{type} eq 'text' ) {
%
% my $nodisplay = ' STYLE="display:none"';
% my $is_inv = ( $flag =~ /^[MA]$/ );
%
% $html .=
% qq! ';
%
% $html .= include('/elements/select-table.html',
% 'element_name' => "${layer}__${field}_classnum",
% 'element_etc' => ( $is_inv
% ? $disabled
% : $nodisplay
% ),
% 'table' => 'inventory_class',
% 'name_col' => 'classname',
% 'value' => $value,
% 'empty_label' => 'Select inventory class',
% );
%
% } elsif ( $def->{type} eq 'checkbox' ) {
%
% $html .= include('/elements/checkbox.html',
% 'field' => $layer.'__'.$field,
% 'curr_value' => $value,
% 'value' => 'Y',
% );
%
% } elsif ( $def->{type} eq 'select' ) {
%
% $html .= qq!{select_table} ) {
% foreach my $record ( qsearch( $def->{select_table}, {} ) ) {
% my $rvalue = $record->getfield($def->{select_key});
% my $select_label = $def->{select_label};
% $html .= qq!' : '>' ).
% $record->$select_label(). ' ';
% } #next $record
% } elsif ( $def->{select_list} ) {
% foreach my $item ( @{$def->{select_list}} ) {
% $html .= qq!' : '>' ).
% $item. ' ';
% } #next $item
% } elsif ( $def->{select_hash} ) {
% if ( ref($def->{select_hash}) eq 'ARRAY' ) {
% tie my %hash, 'Tie::IxHash', @{ $def->{select_hash} };
% $def->{select_hash} = \%hash;
% }
% foreach my $key ( keys %{$def->{select_hash}} ) {
% $html .= qq!' : '>' ).
% $def->{select_hash}{$key}. ' ';
% } #next $key
% } #endif
% $html .= ' ';
%
% } elsif ( $def->{type} eq 'textarea' ) {
%
% $html .=
% qq!';
%
% } 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' ) {
%
% $html .= include('/elements/select-lnp_status.html',
% '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',
% 'element_name_prefix' => "${layer}__${field}_",
% 'curr_value' => $value,
% #doesn't work#'element_etc' => $disabled,
% );
%
% } elsif ( $def->{type} eq 'disabled' ) {
%
% $html .=
% qq! !;
%
% } else {
%
% $html .= 'unknown type '. $def->{type};
%
% }
%
% $html .= " \n";
% $def_info = "($def_info)" if $def_info;
% $html .=
% qq!