X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Felements%2Fpart_svc_column.html;h=53cda859e822c135fed05bfe01c1376a0cc5c143;hb=fcb43580b83129097a2abf53104ca29f3185d44b;hp=1c5b453146353430c2262b4b1bfbd36aa18ba44a;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;p=freeside.git
diff --git a/httemplate/edit/elements/part_svc_column.html b/httemplate/edit/elements/part_svc_column.html
index 1c5b45314..53cda859e 100644
--- a/httemplate/edit/elements/part_svc_column.html
+++ b/httemplate/edit/elements/part_svc_column.html
@@ -64,26 +64,11 @@ my %communigate_fields = (
%once>
-<& /elements/table.html &>
-
>Exports |
-
-% # exports
-% foreach my $part_export (@part_export) {
-
- exportnum} ? 'CHECKED' : '' %>>
- <% $part_export->label_html %>
- |
-% $count++;
-% if ( $count % $columns == 0 ) {
-
-
-% }
-% }
-
-
+%# 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.
@@ -183,8 +168,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'},
@@ -220,7 +205,7 @@ that field.
'name_col' => 'classname',
'curr_value' => $value,
'empty_label' => "Select $mode class",
- 'multiple' => 0,
+ 'multiple' => $multiple,
&>
% }
@@ -248,6 +233,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
@@ -269,27 +270,18 @@ that field.
<%init>
my $svcdb = shift;
my %opt = @_;
-my $columns = 3;
my $count = 0;
my $communigate = 0;
my $conf = FS::Conf->new;
my $part_svc = $opt{'part_svc'} || FS::part_svc->new;
-my @part_export;
-my $export_info = FS::part_export::export_info($svcdb);
-foreach (keys %{ $export_info }) {
- push @part_export, qsearch('part_export', { exporttype => $_ });
+# see if there are communigate exports configured
+if ( exists $communigate_fields{$svcdb} ) {
+ $communigate = FS::part_export->count("exporttype like 'communigate%'");
}
-$communigate = scalar(grep {$_->exporttype =~ /^communigate/} @part_export);
my $svcpart = $opt{'clone'} || $part_svc->svcpart;
-my %has_export_svc;
-if ( $svcpart ) {
- foreach (qsearch('export_svc', { svcpart => $svcpart })) {
- $has_export_svc{$_->exportnum} = 1;
- }
-}
my @fields;
if ( defined( dbdef->table($svcdb) ) ) { # when is it ever not defined?