X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fsvc_phone.html;h=e02ec5ccc1d110d70765e20de5048628c5027bab;hb=37591b61f8ad6fc5c5acb2fd8f520d2dbe4f1539;hp=c1d4b754798a53cbd370bd2ce4b8f09d16e874a0;hpb=1053db7f76169cbbc87840539959a4c362aff242;p=freeside.git diff --git a/httemplate/edit/process/svc_phone.html b/httemplate/edit/process/svc_phone.html index c1d4b7547..e02ec5ccc 100644 --- a/httemplate/edit/process/svc_phone.html +++ b/httemplate/edit/process/svc_phone.html @@ -1,4 +1,29 @@ -<%= include( 'elements/svc_Common.html', +<% include( 'elements/svc_Common.html', 'table' => 'svc_phone', + 'args_callback' => $args_callback, ) %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific? + +my $args_callback = sub { + my( $cgi, $object ) = @_; + + my %opt = (); + if ( $cgi->param('locationnum') == -1 ) { + my $cust_location = new FS::cust_location { + map { $_ => scalar($cgi->param($_)) } + qw( custnum address1 address2 city county state zip country ) + }; + $opt{'cust_location'} = $cust_location; + } + + %opt; + +}; + + + +