X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_dsl.cgi;h=4fca0cd9faf4b1f90b76e342fbe7dda51270bbed;hb=53b930cc67361258ea40f793ca1eb0b3d976bd9c;hp=3568fbd7db023d2420d84628d105d6d83ac78ce6;hpb=46ef8524cf2e6db7b851967062ce92ffb0773d10;p=freeside.git diff --git a/httemplate/edit/svc_dsl.cgi b/httemplate/edit/svc_dsl.cgi index 3568fbd7d..4fca0cd9f 100644 --- a/httemplate/edit/svc_dsl.cgi +++ b/httemplate/edit/svc_dsl.cgi @@ -3,6 +3,7 @@ 'fields' => \@fields, 'svc_new_callback' => $new_cb, 'svc_edit_callback' => $edit_cb, + 'html_foot' => $html_foot, ) %> <%init> @@ -16,7 +17,21 @@ my $date_format = $conf->config('date_format') || '%m/%d/%Y'; my $ti_fields = FS::svc_dsl->table_info->{'fields'}; my @fields = (); -my @uneditable = qw( pushed vendor_qual_id isp_chg isp_prev staticips last_pull notes ); + +my $html_foot = sub { + return " +"; +}; my $edit_cb = sub { my( $cgi,$svc_x, $part_svc,$cust_pkg, $fields1,$opt) = @_; @@ -37,12 +52,10 @@ my $edit_cb = sub { } unless ( $hf eq 'password' || $hf eq 'monitored' ); } } - else { - # XXX - } + # else add any other export-specific stuff here } else { - # XXX + # XXX allow editing everything } }; @@ -72,13 +85,11 @@ my $new_cb = sub { value => $cust_main->ship_company ? $cust_main->ship_company : $cust_main->company, }, - { field => 'svctn', + { field => 'phonenum', value => $defsvctn, }, ); - my $loop_type = { field => 'loop_type' }; - my $export = @exports[0]; if($export->exporttype eq 'ikano') { $cgi->param('vendor_qual_id') =~ /^(\d+)$/ @@ -87,39 +98,35 @@ my $new_cb = sub { die "no start date set on customer package" if !$cust_pkg->start_date; - $loop_type = { field => 'loop_type', - type => 'select', - options => [ '', '0' ], - labels => { '' => 'Line-share', '0', => 'Standalone' }, - # onchange => "document.getElementById('svctn').value = ''", - }; - push @fields, { field => 'isp_chg', type => 'checkbox', }; - push @fields, 'isp_prev'; - push @fields, { field => 'vendor_qual_id', - type => 'fixed', - value => $vendor_qual_id, - }; - } - else { - push @fields, 'username'; + my @addl_fields = ( + { field => 'loop_type', + type => 'select', + options => [ '', '0' ], + labels => { '' => 'Line-share', '0', => 'Standalone' }, + onchange => 'ikano_loop_type_changed', + }, + 'password', + { field => 'isp_chg', type => 'checkbox', }, + 'isp_prev', + { field => 'vendor_qual_id', + type => 'fixed', + value => $vendor_qual_id, }, + { field => 'vendor_order_type', + type => 'hidden', + value => 'N' }, + { field => 'desired_due_date', + type => 'fixed', + formatted_value => + time2str($date_format,$cust_pkg->start_date), + value => $cust_pkg->start_date, + }, + ); + push @fields, @addl_fields; } - - push @fields, 'password'; - - push @fields, $loop_type; - - push @fields, { field => 'vendor_order_type', - type => 'hidden', - value => 'N' }; - push @fields, { field => 'desired_dd', - type => 'fixed', - formatted_value => - time2str($date_format,$cust_pkg->start_date), - value => $cust_pkg->start_date, - }; + # else add any other export-specific stuff here } else { - # XXX + # XXX display everything when no exports attached } };