!.
+% ( $def->{'label'} || $field ).
+% " | ";
+%
+% $html .= qq! | ';
+%
+% $flag = '' if $def->{type} eq 'disabled';
%
% $html .= qq!!;
%
-% if ( ref($def) && $def->{type} eq 'disabled' ) {
+% if ( $def->{type} eq 'disabled' ) {
%
% $html .= 'No default';
%
@@ -306,6 +178,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)$/;
+%
% #here is where the SUB from above is called, to skip some choices
% next if $flag{$f}->{condition}
% && &{ $flag{$f}->{condition} }( $def, $layer, $field );
@@ -329,9 +204,14 @@ that field.
% " what.form.${layer}__${field}_classnum.disabled = true;".
% " what.form.${layer}__${field}_classnum.style.backgroundColor = '#dddddd';".
% " }".
-% ' } else if ( f == "D" || f == "F" ) { //enable, text box',
+% ' } else if ( f == "D" || f == "F" || f =="S" ) { //enable, text box',
% " what.form.${layer}__${field}.disabled = false;".
% " what.form.${layer}__${field}.style.backgroundColor = '#ffffff';".
+% " if ( f == 'S' || '${field}' == 'usergroup' ) {". # kludge
+% " what.form.${layer}__${field}.multiple = true;".
+% " } else {".
+% " what.form.${layer}__${field}.multiple = false;".
+% " }".
% " what.form.${layer}__${field}.style.display = '';".
% " if ( what.form.${layer}__${field}_classnum ) {".
% " what.form.${layer}__${field}_classnum.disabled = false;".
@@ -359,7 +239,7 @@ that field.
% my $disabled = $flag ? ''
% : 'DISABLED STYLE="background-color: #dddddd"';
%
-% if ( ! ref($def) || $def->{type} eq 'text' ) {
+% if ( !$def->{type} || $def->{type} eq 'text' ) {
%
% my $nodisplay = ' STYLE="display:none"';
% my $is_inv = ( $flag =~ /^[MA]$/ );
@@ -382,26 +262,71 @@ 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! |
\n";
+
+% $def_info = "($def_info)" if $def_info;
+% $html .=
+% qq!