fix method name conflict
[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 <%init>
17
18 my $conf = new FS::Conf;
19 my %opt = @_;
20
21 my $cust_pkg       = $opt{'cust_pkg'};
22
23 my $contact = $cust_pkg->pkg_contact;
24
25 sub pkg_change_contact_link {
26   my $cust_pkg = shift;
27   my $pkgpart = $cust_pkg->pkgpart;
28   include( '/elements/popup_link-cust_pkg.html',
29 #XXX
30     'action'      => $p. "misc/change_pkg.cgi?contactnum=-1",
31     'label'       => emt('Change contact'),
32     'actionlabel' => emt('Change'),
33     'cust_pkg'    => $cust_pkg,
34   );
35 }
36
37 sub edit_contact_link {
38   my $contactnum = shift;
39   include( '/elements/popup_link.html',
40     'action'      => $p. "edit/cust_contact.cgi?contactnum=$contactnum",
41     'label'       => emt('Edit contact'),
42     'actionlabel' => emt('Edit'),
43   );
44 }
45
46 </%init>