X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_pkg.cgi;h=adbec7a74a36922e6b3362efd9e7a3010bc0136e;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=2a4366ae4dd09fa10fb7f0ba278c2ad8cec5d606;hpb=2419a740ea77d7c1fd2151dbf8822fc40fd94053;p=freeside.git
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index 2a4366ae4..adbec7a74 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -143,7 +143,6 @@
),
'',
],
- 'extra_choices_callback'=> $extra_choices,
)
%>
<%init>
@@ -193,7 +192,7 @@ my %disable = (
'' => {},
);
-foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
+foreach my $field (qw( setup last_bill bill adjourn susp expire cancel active )) {
my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field);
@@ -253,30 +252,29 @@ sub time_or_blank {
};
}
-my $html_init = include('/elements/init_overlib.html');
-
-my $extra_choices = sub {
+my $html_init = sub {
my $query = shift;
my $text = '';
-
- if( $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages') ) {
- $text .= '
'.
- include( '/elements/popup_link.html',
- 'label' => 'Change these packages',
- 'action' => "${p}misc/bulk_change_pkg.cgi?$query",
- 'actionlabel' => 'Change Packages',
- 'width' => 569,
- 'height' => 210,
- );
- if( $FS::CurrentUser::CurrentUser->access_right('Edit customer package dates') ) {
- $text .= '
'.
- include( '/elements/popup_link.html',
- 'label' => 'Increment next bill date',
- 'action' => "${p}misc/bulk_pkg_increment_bill.cgi?$query",
- 'actionlabel' => 'Increment Bill Date',
- 'width' => 569,
- 'height' => 210,
- );
+ my $curuser = $FS::CurrentUser::CurrentUser;
+
+ if ( $curuser->access_right('Bulk change customer packages') ) {
+ $text .= include('/elements/init_overlib.html').
+ include( '/elements/popup_link.html',
+ 'label' => 'Change these packages',
+ 'action' => "${p}misc/bulk_change_pkg.cgi?$query",
+ 'actionlabel' => 'Change Packages',
+ 'width' => 569,
+ 'height' => 210,
+ ). '
';
+
+ if ( $curuser->access_right('Edit customer package dates') ) {
+ $text .= include( '/elements/popup_link.html',
+ 'label' => 'Increment next bill date',
+ 'action' => "${p}misc/bulk_pkg_increment_bill.cgi?$query",
+ 'actionlabel' => 'Increment Bill Date',
+ 'width' => 569,
+ 'height' => 210,
+ ). '
';
}
}
return $text;