2 <% $contact->line |h %>
5 ( <%pkg_change_contact_link($cust_pkg)%> )
6 ( <%pkg_detach_link($cust_pkg)%> )
9 % } elsif ( $show_link ) {
11 ( <%pkg_add_contact_link($cust_pkg)%> )
16 my $conf = new FS::Conf;
19 my $cust_pkg = $opt{'cust_pkg'};
22 ! $cust_pkg->get('cancel')
23 && $FS::CurrentUser::CurrentUser->access_right('Change customer package');
25 my $contact = $cust_pkg->contact_obj;
27 sub pkg_change_contact_link {
29 #my $pkgpart = $cust_pkg->pkgpart;
30 include( '/elements/popup_link-cust_pkg.html',
31 'action' => $p. "misc/change_pkg_contact.html",
32 'label' => emt('Change'), # contact'),
33 'actionlabel' => emt('Change'),
34 'cust_pkg' => $cust_pkg,
40 sub pkg_add_contact_link {
42 #my $pkgpart = $cust_pkg->pkgpart;
43 include( '/elements/popup_link-cust_pkg.html',
44 'action' => $p. "misc/change_pkg_contact.html",
45 'label' => emt('Add contact'),
46 'actionlabel' => emt('Change'),
47 'cust_pkg' => $cust_pkg,
55 #my $pkgpart = $cust_pkg->pkgpart;
56 include( '/elements/popup_link-cust_pkg.html',
57 'action' => $p. "misc/detach_pkg.html",
58 'label' => emt('Detach'),
59 'actionlabel' => emt('Detach'),
60 'cust_pkg' => $cust_pkg,
66 #sub edit_contact_link {
67 # my $contactnum = shift;
68 # include( '/elements/popup_link.html',
69 # 'action' => $p. "edit/cust_contact.cgi?contactnum=$contactnum",
70 # 'label' => emt('Edit contact'),
71 # 'actionlabel' => emt('Edit'),