X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Felements%2Fpart_svc_column.html;h=6dcb602fefdcc5db430014db5b38874dceac4a5a;hb=10614457fd7db63cbcc0bf9bfeebbbb99258eaa3;hp=fbea9bd6d98cc9dcda76283799e7fc96cf3cf7ea;hpb=52e1a09b0f426bf572e0af9d97bc1c00dd22f427;p=freeside.git diff --git a/httemplate/edit/elements/part_svc_column.html b/httemplate/edit/elements/part_svc_column.html index fbea9bd6d..6dcb602fe 100644 --- a/httemplate/edit/elements/part_svc_column.html +++ b/httemplate/edit/elements/part_svc_column.html @@ -183,8 +183,8 @@ that field. 'curr_value' => $value, &> % } -% } elsif ( $def->{'type'} =~ /select-(.*?).html/ ) { - <& '/elements/'.$def->{'type'}, +% } elsif ( $def->{'type'} =~ /^select-(.*?)(.html)?$/ && $1 ne 'hardware' ) { + <& "/elements/select-$1.html", 'field' => $name, 'id' => $name.'_select', 'multiple' => $def->{'multiple'}, @@ -207,15 +207,20 @@ that field. NAME="<%$name%>" ID="<%$name%>" VALUE="<%$value%>"> -% # inventory class selection +% my $mode = 'inventory'; +% my $multiple = 1; +% if ( $def->{'type'} eq 'select-hardware' ) { +% $mode = 'hardware'; +% $multiple = 0; +% } <& /elements/select-table.html, 'field' => $name.'_classnum', 'id' => $name.'_select', - 'table' => 'inventory_class', + 'table' => $mode.'_class', 'name_col' => 'classname', 'curr_value' => $value, - 'empty_label' => 'Select inventory class', - 'multiple' => 1, + 'empty_label' => "Select $mode class", + 'multiple' => $multiple, &> % } @@ -243,6 +248,22 @@ that field. % } +% # special case: services with attached routers (false laziness...) +% if ( $svcdb eq 'svc_acct' +% or $svcdb eq 'svc_broadband' +% or $svcdb eq 'svc_dsl' +% or $svcdb eq 'svc_circuit' ) { +% push @fields, 'has_router'; + + + <% emt('This service has an attached router') %> + + + has_router ? 'CHECKED' : '' %>> + + +% } <& /elements/progress-init.html, $svcdb, #form name