projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git]
/
httemplate
/
view
/
cust_main
/
packages
/
contact.html
diff --git
a/httemplate/view/cust_main/packages/contact.html
b/httemplate/view/cust_main/packages/contact.html
index
9312991
..
8c59615
100644
(file)
--- a/
httemplate/view/cust_main/packages/contact.html
+++ b/
httemplate/view/cust_main/packages/contact.html
@@
-1,26
+1,31
@@
% if ( $contact ) {
<% $contact->line |h %>
% if ( $contact ) {
<% $contact->line |h %>
-% if ( $show_
link
) {
+% if ( $show_
change_link && ! $opt{no_links}
) {
<FONT SIZE=-1>
( <%pkg_change_contact_link($cust_pkg)%> )
</FONT>
<FONT SIZE=-1>
( <%pkg_change_contact_link($cust_pkg)%> )
</FONT>
-%
}
-%
} elsif ( $show_link
) {
+% }
+%
if ( $show_detach_link && ! $opt{no_links}
) {
<FONT SIZE=-1>
<FONT SIZE=-1>
- ( <%pkg_
add_contact
_link($cust_pkg)%> )
+ ( <%pkg_
detach
_link($cust_pkg)%> )
</FONT>
</FONT>
+% }
+ <BR>
% }
<%init>
% }
<%init>
-my $conf = new FS::Conf;
my %opt = @_;
my $cust_pkg = $opt{'cust_pkg'};
my %opt = @_;
my $cust_pkg = $opt{'cust_pkg'};
-my $show_link =
+my $show_
change_
link =
! $cust_pkg->get('cancel')
&& $FS::CurrentUser::CurrentUser->access_right('Change customer package');
! $cust_pkg->get('cancel')
&& $FS::CurrentUser::CurrentUser->access_right('Change customer package');
+my $show_detach_link =
+ ! $cust_pkg->get('cancel')
+ && $FS::CurrentUser::CurrentUser->access_right('Detach customer package');
+
my $contact = $cust_pkg->contact_obj;
sub pkg_change_contact_link {
my $contact = $cust_pkg->contact_obj;
sub pkg_change_contact_link {
@@
-36,16
+41,16
@@
sub pkg_change_contact_link {
);
}
);
}
-sub pkg_
add_contact
_link {
+sub pkg_
detach
_link {
my $cust_pkg = shift;
#my $pkgpart = $cust_pkg->pkgpart;
include( '/elements/popup_link-cust_pkg.html',
my $cust_pkg = shift;
#my $pkgpart = $cust_pkg->pkgpart;
include( '/elements/popup_link-cust_pkg.html',
- 'action' => $p. "misc/
change_pkg_contact
.html",
- 'label' => emt('
Add contact
'),
- 'actionlabel' => emt('
Change
'),
+ 'action' => $p. "misc/
detach_pkg
.html",
+ 'label' => emt('
Detach
'),
+ 'actionlabel' => emt('
Detach
'),
'cust_pkg' => $cust_pkg,
'width' => 616,
'cust_pkg' => $cust_pkg,
'width' => 616,
- 'height' =>
192
,
+ 'height' =>
720
,
);
}
);
}