X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_svc.cgi;h=9432839e7d46e3e471b91a9a574cc9140a143e60;hb=eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd;hp=ba152db9c02a39f8d2f2381892ca7b1e623fd9de;hpb=633c48448d9468690b7ad77eb6ff7c660a286658;p=freeside.git diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi index ba152db9c..9432839e7 100755 --- a/httemplate/edit/part_svc.cgi +++ b/httemplate/edit/part_svc.cgi @@ -166,12 +166,13 @@ that field. % % foreach my $field (@fields) { % -% my $part_svc_column = $part_svc->part_svc_column($field); -% my $value = $part_svc_column->columnvalue; -% my $flag = $part_svc_column->columnflag; % #my $def = $defs{$layer}{$field}; % my $def = FS::part_svc->svc_table_fields($layer)->{$field}; % my $label = $def->{'def_label'} || $def->{'label'}; +% my $formatter = $def->{'format'} || sub { shift }; +% my $part_svc_column = $part_svc->part_svc_column($field); +% my $value = &$formatter($part_svc_column->columnvalue); +% my $flag = $part_svc_column->columnflag; % % if ( $bgcolor eq $bgcolor1 ) { % $bgcolor = $bgcolor2; @@ -223,6 +224,11 @@ that field. % ' } 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;". @@ -276,7 +282,7 @@ that field. % } elsif ( $def->{type} eq 'select' ) { % % $html .= qq!