X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_dsl.cgi;h=48464fbad61bf5aa794164c23097dc436566ce2f;hb=adaed99f98856d3a2a72804c77ef006a0bce6cb8;hp=7493d98b9919df7f73f593aeaccd8ef1a50d570c;hpb=c58774a70c3326ad2ba5a7a38b174dfbd76a9f78;p=freeside.git diff --git a/httemplate/edit/svc_dsl.cgi b/httemplate/edit/svc_dsl.cgi index 7493d98b9..48464fbad 100644 --- a/httemplate/edit/svc_dsl.cgi +++ b/httemplate/edit/svc_dsl.cgi @@ -55,7 +55,7 @@ my $edit_cb = sub { # else add any other export-specific stuff here } else { - # XXX allow editing everything + push @fields, qw( first last company phonenum circuitnum rate_band vpi vci ); } }; @@ -65,7 +65,6 @@ my $new_cb = sub { die "more than one DSL-pulling export attached to svcpart ".$part_svc->svcpart if ( scalar(@exports) > 1 ); - if ( scalar(@exports) == 1 ) { my $cust_main = $cust_pkg->cust_main; my $defsvctn = $cust_main->ship_daytime ? $cust_main->ship_daytime : $cust_main->daytime; @@ -90,11 +89,22 @@ my $new_cb = sub { }, ); + if ( scalar(@exports) == 1 ) { my $export = @exports[0]; if($export->exporttype eq 'ikano') { my $ddd = $cust_pkg->start_date; $ddd = time unless $ddd; + my @quals = $export->quals_by_cust_and_pkg($cust_pkg->cust_main->custnum,$cust_pkg->pkgpart); + my @prequalids; + my %prequal_labels; + foreach my $qual ( @quals ) { + my $prequalid = $qual->vendor_qual_id; + push @prequalids, $prequalid; + $prequal_labels{$prequalid} = "$prequalid - qualification #" + .$qual->qualnum; + } + my @addl_fields = ( { field => 'loop_type', type => 'select', @@ -105,7 +115,12 @@ my $new_cb = sub { 'password', { field => 'isp_chg', type => 'checkbox', }, 'isp_prev', - 'vendor_qual_id', + { field => 'vendor_qual_id', + type => 'select', + options => \@prequalids, + labels => \%prequal_labels, + onchange => 'ikano_vendor_qual_id_changed', + }, { field => 'vendor_order_type', type => 'hidden', value => 'NEW' }, @@ -120,8 +135,8 @@ my $new_cb = sub { } # else add any other export-specific stuff here } - else { - # XXX display everything when no exports attached + else { # display non-export and non-Ikano fields + push @fields, qw( rate_band circuitnum vpi vci ); } };