fix fallout from #22185 (#22601, #22600)
[freeside.git] / httemplate / view / cust_main / packages / contact.html
1 % if ( $contact ) {
2     <% $contact->line |h %>
3 % }
4
5 % if ( ! $cust_pkg->get('cancel')
6 %      && $FS::CurrentUser::CurrentUser->access_right('Change customer package')
7 %    )
8 % {
9   <FONT SIZE=-1>
10 %#XXX    (&nbsp;<%pkg_change_contact_link($cust_pkg)%>&nbsp;)
11 %#  %   if ( $cust_pkg->contactnum ) {
12 %#          (&nbsp;<%edit_contact_link($cust_pkg->contactnum)%>&nbsp;)
13 %#  %   }
14   </FONT>
15 % } 
16
17 <%init>
18
19 my $conf = new FS::Conf;
20 my %opt = @_;
21
22 my $cust_pkg       = $opt{'cust_pkg'};
23
24 my $contact = $cust_pkg->contact_obj;
25
26 sub pkg_change_contact_link {
27   my $cust_pkg = shift;
28   my $pkgpart = $cust_pkg->pkgpart;
29   include( '/elements/popup_link-cust_pkg.html',
30 #XXX
31     'action'      => $p. "misc/change_pkg.cgi?contactnum=-1",
32     'label'       => emt('Change contact'),
33     'actionlabel' => emt('Change'),
34     'cust_pkg'    => $cust_pkg,
35   );
36 }
37
38 sub edit_contact_link {
39   my $contactnum = shift;
40   include( '/elements/popup_link.html',
41     'action'      => $p. "edit/cust_contact.cgi?contactnum=$contactnum",
42     'label'       => emt('Edit contact'),
43     'actionlabel' => emt('Edit'),
44   );
45 }
46
47 </%init>