1 <& elements/svc_Common.html,
2 'table' => 'svc_phone',
3 'args_callback' => $args_callback,
4 'value_callback' => $value_callback,
5 'edit_callback' => $edit_callback,
11 if ( $cgi->param('bulk') ) {
12 $opt{'bulk'} = 'phonenum';
14 my $cust_pkg = qsearchs('cust_pkg', { pkgnum=>scalar($cgi->param('pkgnum')) })
15 or die "unknown pkgnum";
16 my $custnum = $cust_pkg->custnum;
19 $FS::CurrentUser::CurrentUser->default_customer_view =~ /^(jumbo|packages)$/
22 #my $frag = "cust_pkg$pkgnum"; #hack for IE ignoring real #fragment
23 $opt{'redirect'}= popurl(3)."view/cust_main.cgi?custnum=$custnum$show;dummy=";
26 my $right = $opt{'bulk'} ? 'Bulk provision customer service'
27 : 'Provision customer service';
30 unless $FS::CurrentUser::CurrentUser->access_right($right);
32 $cgi->param('phonenum', $cgi->param('phonenum_manual') )
33 if $cgi->param('phonenum_which') eq 'phonenum_manual';
35 my $tollfreephonenum = $cgi->param('tollfreephonenum');
36 $cgi->param('phonenum',$tollfreephonenum) if $tollfreephonenum =~ /^\d+$/;
38 my $args_callback = sub {
39 my( $cgi, $object ) = @_;
42 if ( $cgi->param('locationnum') == -1 ) {
43 my $cust_location = FS::cust_location->new({
44 map { $_ => scalar($cgi->param($_)) }
45 qw( custnum address1 address2 city county state zip country )
47 $opt{'cust_location'} = $cust_location;
54 my $value_callback = sub {
55 my ($field, $value) = @_;
56 ($field =~ /_date$/) ? parse_datetime($value) : $value;
59 my $edit_callback = sub {
60 my( $new, $old ) = @_;
61 $new->sip_password( $old->sip_password ) if $new->sip_password eq '*HIDDEN*';