X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_dsl.cgi;h=36345b9c57e449fd9263c837f90c259264bca2c0;hb=07ed221540128b8c75f4cb5a2af1e01b25fa8e18;hp=5896f18ae4689bdaaf423ce9ea0fbdb83ca06517;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git diff --git a/httemplate/edit/svc_dsl.cgi b/httemplate/edit/svc_dsl.cgi index 5896f18ae..36345b9c5 100644 --- a/httemplate/edit/svc_dsl.cgi +++ b/httemplate/edit/svc_dsl.cgi @@ -24,11 +24,16 @@ my $html_foot = sub { " function ikano_loop_type_changed() { var loop_type = document.getElementById('loop_type').value; var phonenum = document.getElementById('phonenum'); + var gateway_access_number = document.getElementById('gateway_access_number'); if(loop_type == '0') { phonenum.value = ''; phonenum.disabled = true; + gateway_access_number.value = ''; + gateway_access_number.disabled = true; + } else { + phonenum.disabled = false; + gateway_access_number.disabled = false; } - else phonenum.disabled = false; } "; }; @@ -41,21 +46,36 @@ my $edit_cb = sub { if ( scalar(@exports) == 1 ) { my $export = @exports[0]; - if($export->exporttype eq 'ikano') { + if($export->exporttype eq 'ikano' && $export->import_mode) { + @fields = (); + } + elsif($export->exporttype eq 'ikano') { @fields = ( 'password', 'monitored', ); - foreach my $hf ( keys %$ti_fields ) { - push @fields, { - field => $hf, - type => 'hidden', - value => $svc_x->$hf, - } unless ( $hf eq 'password' || $hf eq 'monitored' ); + if ( $svc_x->vendor_qual_id ) { + push @fields, { field => 'vendor_qual_id', + type => 'hidden', + value => $svc_x->vendor_qual_id, + }; + } else { + push @fields, 'vendor_qual_id'; + } + + foreach my $hf ( + grep { $_ !~ /^(password|monitored|vendor_qual_id)$/ } + keys %$ti_fields + ) { + push @fields, { + field => $hf, + type => 'hidden', + value => $svc_x->$hf, + }; } } # else add any other export-specific stuff here } else { - push @fields, qw( first last company phonenum circuitnum rate_band vpi vci ); + push @fields, qw( first last company phonenum gateway_access_number circuitnum rate_band vpi vci ); } }; @@ -64,6 +84,14 @@ my $new_cb = sub { my @exports = $part_svc->part_export_dsl_pull; die "more than one DSL-pulling export for svcpart ".$part_svc->svcpart if ( scalar(@exports) > 1 ); + + if ( scalar(@exports) == 1 ) { + my $export = @exports[0]; + if($export->exporttype eq 'ikano' && $export->import_mode) { + @fields = ( 'vendor_order_id' ); + return; + } + } my $cust_main = $cust_pkg->cust_main; @@ -112,6 +140,10 @@ my $new_cb = sub { { field => 'phonenum', value => $phonenum, }; + { field => 'gateway_access_number', + value => '', + }; + }