This commit was generated by cvs2svn to compensate for changes in r9232,
[freeside.git] / httemplate / edit / process / svc_phone.html
1 <% include( 'elements/svc_Common.html',
2                'table'    => 'svc_phone',
3                'args_callback' => $args_callback,
4            )
5 %>
6 <%init>
7
8 die "access denied"
9   unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
10
11 my $args_callback = sub {
12   my( $cgi, $object ) = @_;
13
14   my %opt = ();
15   if ( $cgi->param('locationnum') == -1 ) {
16     my $cust_location = new FS::cust_location {
17       map { $_ => scalar($cgi->param($_)) }
18           qw( custnum address1 address2 city county state zip country )
19     };
20     $opt{'cust_location'} = $cust_location;
21   }
22
23   %opt;
24
25 };
26
27
28
29 </%init>