1 <% include( 'elements/svc_Common.html',
4 'svc_new_callback' => $new_cb,
5 'svc_edit_callback' => $edit_cb,
6 'html_foot' => $html_foot,
12 unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
14 my $conf = new FS::Conf;
15 my $date_format = $conf->config('date_format') || '%m/%d/%Y';
17 my $ti_fields = FS::svc_dsl->table_info->{'fields'};
23 <SCRIPT TYPE=\"text/javascript\">
24 function ikano_loop_type_changed() {
25 var loop_type = document.getElementById('loop_type').value;
26 var phonenum = document.getElementById('phonenum');
27 if(loop_type == '0') {
29 phonenum.disabled = true;
31 else phonenum.disabled = false;
37 my( $cgi,$svc_x, $part_svc,$cust_pkg, $fields1,$opt) = @_;
38 my @exports = $part_svc->part_export_dsl_pull;
39 die "more than one DSL-pulling export attached to svcpart ".$part_svc->svcpart
40 if ( scalar(@exports) > 1 );
42 if ( scalar(@exports) == 1 ) {
43 my $export = @exports[0];
44 if($export->exporttype eq 'ikano') {
45 @fields = ( 'password', 'monitored', );
47 foreach my $hf ( keys %$ti_fields ) {
52 } unless ( $hf eq 'password' || $hf eq 'monitored' );
55 # else add any other export-specific stuff here
58 # XXX allow editing everything
63 my( $cgi,$svc_x, $part_svc,$cust_pkg, $fields1,$opt) = @_;
64 my @exports = $part_svc->part_export_dsl_pull;
65 die "more than one DSL-pulling export attached to svcpart ".$part_svc->svcpart
66 if ( scalar(@exports) > 1 );
68 if ( scalar(@exports) == 1 ) {
69 my $cust_main = $cust_pkg->cust_main;
70 my $defsvctn = $cust_main->ship_daytime ? $cust_main->ship_daytime
71 : $cust_main->daytime;
72 $defsvctn =~ s/[^0-9]//g;
76 value => $cust_main->ship_first ? $cust_main->ship_first
80 value => $cust_main->ship_last ? $cust_main->ship_last
84 value => $cust_pkg->cust_main->ship_company,
85 value => $cust_main->ship_company ? $cust_main->ship_company
86 : $cust_main->company,
88 { field => 'phonenum',
93 my $export = @exports[0];
94 if($export->exporttype eq 'ikano') {
95 my $ddd = $cust_pkg->start_date;
96 $ddd = time unless $ddd;
99 { field => 'loop_type',
101 options => [ '', '0' ],
102 labels => { '' => 'Line-share', '0', => 'Standalone' },
103 onchange => 'ikano_loop_type_changed',
106 { field => 'isp_chg', type => 'checkbox', },
109 { field => 'vendor_order_type',
112 { field => 'desired_due_date',
115 time2str($date_format,$ddd),
119 push @fields, @addl_fields;
121 # else add any other export-specific stuff here
124 # XXX display everything when no exports attached