X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Felements%2Fpart_svc_column.html;h=816f3428b31aefad8fdf116f28a60d72a3a936ad;hb=c22d84e565ab16db142395dce2e8621624eff140;hp=a6ccaf867fb63da92122b7d6e1afbd06e70d3578;hpb=4fda726fa9f8e709c68ec823edc5ae702723281c;p=freeside.git diff --git a/httemplate/edit/elements/part_svc_column.html b/httemplate/edit/elements/part_svc_column.html index a6ccaf867..816f3428b 100644 --- a/httemplate/edit/elements/part_svc_column.html +++ b/httemplate/edit/elements/part_svc_column.html @@ -63,21 +63,20 @@ my %communigate_fields = ( ); -

+
%# include export selection <& export_svc.html, part_svc => $part_svc, svcdb => $svcdb &> -For the selected table, you can give fields default or fixed (unchangeable) -values, or select an inventory class to manually or automatically fill in -that field. + +Fields <& /elements/table-grid.html, cellpadding => 4 &> Field Label Modifier - Required? + <% $manual_require ? 'Required?' : '' %> % $part_svc->set('svcpart' => $opt{'clone'}) if $opt{'clone'}; # for now % my $i = 0; @@ -133,7 +132,10 @@ that field. % } elsif ( $def->{'type'} eq 'select' ) { % % if ( $def->{'select_table'} ) { - <& /elements/select-table.html, +% # set the 'select_svc' flag to enable two-step selection of services +% my $comp = '/elements/select-table.html'; +% $comp = '/elements/select-svc.html' if $def->{'select_svc'}; + <& $comp, 'field' => $name, 'id' => $name.'_select', 'table' => $def->{'select_table'}, @@ -212,7 +214,9 @@ that field. % } -% if (!$def->{'type'} || !(grep {$_ eq $def->{'type'}} ('checkbox','disabled'))) { +% if ($manual_require && +% (!$def->{'type'} || !(grep {$_ eq $def->{'type'}} ('checkbox','disabled'))) +% ) { required || $def->{'required'}) ? 'CHECKED' : '' %> <% $def->{'required'} ? 'DISABLED' : '' %> @@ -263,8 +267,9 @@ that field. <& /elements/progress-init.html, $svcdb, #form name [ # form fields to send - qw(svc svcpart classnum selfservice_access disabled preserve exportnum), - @fields + 'ALL' +# qw(svc svcpart classnum selfservice_access disabled preserve exportnum), +# @fields ], 'process/part_svc.cgi', # target $p.'browse/part_svc.cgi', # redirect landing @@ -310,4 +315,5 @@ if ( $svcdb eq 'svc_acct' } my @defs = map { FS::part_svc->svc_table_fields($svcdb)->{$_} } @fields; +my $manual_require = FS::part_svc->svc_table_info($svcdb)->{'manual_require'};