!.
+% ( $def->{'label'} || $field ).
% " | ";
+%
+% $html .= qq! | ';
+%
% $flag = '' if $def->{type} eq 'disabled';
%
% $html .= qq!!;
@@ -171,6 +220,9 @@ that field.
%
% 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|dish)$/;
+%
% #here is where the SUB from above is called, to skip some choices
% next if $flag{$f}->{condition}
% && &{ $flag{$f}->{condition} }( $def, $layer, $field );
@@ -208,7 +260,8 @@ that field.
% " what.form.${layer}__${field}_classnum.style.backgroundColor = '#ffffff';".
% " what.form.${layer}__${field}_classnum.style.display = 'none';".
% " }".
-% ' } else if ( f == "M" || f == "A" ) { //enable, inventory',
+% ' } else if ( f == "M" || f == "A" || f == "H" ) { '.
+% '//enable, inventory',
% " what.form.${layer}__${field}.disabled = false;".
% " what.form.${layer}__${field}.style.backgroundColor = '#ffffff';".
% " what.form.${layer}__${field}.style.display = 'none';".
@@ -228,10 +281,10 @@ that field.
%
% my $disabled = $flag ? ''
% : 'DISABLED STYLE="background-color: #dddddd"';
+% my $nodisplay = ' STYLE="display:none"';
%
% if ( !$def->{type} || $def->{type} eq 'text' ) {
%
-% my $nodisplay = ' STYLE="display:none"';
% my $is_inv = ( $flag =~ /^[MA]$/ );
%
% $html .=
@@ -242,6 +295,7 @@ that field.
%
% $html .= include('/elements/select-table.html',
% 'element_name' => "${layer}__${field}_classnum",
+% 'id' => "${layer}__${field}_classnum",
% 'element_etc' => ( $is_inv
% ? $disabled
% : $nodisplay
@@ -252,6 +306,14 @@ that field.
% '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!';
%
-% } elsif ( $def->{type} eq 'radius_usergroup_selector' ) {
+% } elsif ( $def->{type} eq 'textarea' ) {
%
-% #XXX disable the RADIUS usergroup selector? ugh it sure does need
-% #an overhaul, people have dum group problems because of it
+% $html .=
+% qq!';
+%
+% } elsif ( $def->{type} =~ /select-(.*?).html/ ) {
+%
+% $html .= include("/elements/".$def->{type},
+% 'curr_value' => $value,
+% 'element_name' => "${layer}__${field}",
+% 'element_etc' => $disabled,
+% 'multiple' => ($def->{multiple} ||
+% $flag eq 'S'),
+% # allow the table def to force 'multiple'
+% );
%
-% $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 'select-hardware' ) {
+%
+% $html .= qq!!;
+% $html .= include('/elements/select-hardware_class.html',
+% 'curr_value' => $value,
+% 'element_name' => "${layer}__${field}_classnum",
+% 'id' => "${layer}__${field}_classnum",
+% 'element_etc' => $flag ne 'H' && $nodisplay,
+% 'empty_label' => 'Select hardware class',
+% );
%
% } elsif ( $def->{type} eq 'disabled' ) {
%
@@ -290,11 +390,20 @@ that field.
%
% } else {
%
-% $html .= 'unknown type'. $def->{type};
+% $html .= 'unknown type '. $def->{type};
%
% }
%
% $html .= " |
\n";
+
+% $def_info = "($def_info)" if $def_info;
+% $html .=
+% qq!