diff options
Diffstat (limited to 'httemplate/view/cust_main/packages/contact.html')
-rw-r--r-- | httemplate/view/cust_main/packages/contact.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/httemplate/view/cust_main/packages/contact.html b/httemplate/view/cust_main/packages/contact.html new file mode 100644 index 000000000..a6f8a4273 --- /dev/null +++ b/httemplate/view/cust_main/packages/contact.html @@ -0,0 +1,48 @@ +% if ( $contact ) { + <% $contact->line |h %> +% } + +% if ( ! $cust_pkg->get('cancel') +% && $FS::CurrentUser::CurrentUser->access_right('Change customer package') +% ) +% { + <FONT SIZE=-1> +%#XXX ( <%pkg_change_contact_link($cust_pkg)%> ) +%# % if ( $cust_pkg->contactnum ) { +%# ( <%edit_contact_link($cust_pkg->contactnum)%> ) +%# % } + </FONT> +% } + +</TD> +<%init> + +my $conf = new FS::Conf; +my %opt = @_; + +my $cust_pkg = $opt{'cust_pkg'}; + +my $contact = $cust_pkg->contact; + +sub pkg_change_contact_link { + my $cust_pkg = shift; + my $pkgpart = $cust_pkg->pkgpart; + include( '/elements/popup_link-cust_pkg.html', +#XXX + 'action' => $p. "misc/change_pkg.cgi?contactnum=-1", + 'label' => emt('Change contact'), + 'actionlabel' => emt('Change'), + 'cust_pkg' => $cust_pkg, + ); +} + +sub edit_contact_link { + my $contactnum = shift; + include( '/elements/popup_link.html', + 'action' => $p. "edit/cust_contact.cgi?contactnum=$contactnum", + 'label' => emt('Edit contact'), + 'actionlabel' => emt('Edit'), + ); +} + +</%init> |