summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-04-12 13:16:57 -0400
committerChristopher Burger <burgerc@freeside.biz>2019-04-12 13:16:57 -0400
commit7afd80e3dfcaa34b04f693c40949d7408f7a7ac1 (patch)
treecdfb8eee2c2668d1b02d6d9c5671eca9e959143f /httemplate
parent7ff902ccf499a8a2e8598d653dd958cf6a364b26 (diff)
RT# 79913 - added ability to mass transfer customers to new agent
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/menubar.html7
-rw-r--r--httemplate/elements/select-agent.html3
-rwxr-xr-xhttemplate/search/cust_main.cgi4
-rwxr-xr-xhttemplate/search/cust_main.html9
4 files changed, 21 insertions, 2 deletions
diff --git a/httemplate/elements/menubar.html b/httemplate/elements/menubar.html
index c14904337..ffe83ec57 100644
--- a/httemplate/elements/menubar.html
+++ b/httemplate/elements/menubar.html
@@ -52,7 +52,12 @@ while (@_) {
}
- push @html, qq!<A HREF="$url_base$url" $style>$item</A>!;
+ if ($item eq 'popup') {
+ push @html, $url;
+ }
+ else {
+ push @html, qq!<A HREF="$url_base$url" $style>$item</A>!;
+ }
}
diff --git a/httemplate/elements/select-agent.html b/httemplate/elements/select-agent.html
index fd2c57eac..2bd0095da 100644
--- a/httemplate/elements/select-agent.html
+++ b/httemplate/elements/select-agent.html
@@ -3,7 +3,7 @@
'name_col' => 'agent',
'value' => $agentnum || '',
'agent_virt' => 1,
- 'empty_label' => emt('all'),
+ 'empty_label' => $empty_label,
'hashref' => { 'disabled' => '' },
'order_by' => ' ORDER BY agent',
'disable_empty' => $disable_empty,
@@ -18,6 +18,7 @@ $opt{'records'} = delete $opt{'agents'}
if $opt{'agents'};
my $curuser = $FS::CurrentUser::CurrentUser;
+my $empty_label = $opt{'empty_label'} ? $opt{'empty_label'} : 'all';
my $disable_empty = 0;
if ( $opt{'agent_null_right'} ) {
if ( $curuser->access_right($opt{'agent_null_right'}) ) {
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index cce4f0d7d..24d49c588 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -38,6 +38,10 @@
( <a href="<% $cgi->self_url %>"><% mt("$linklabel canceled customers") |h %></a> )
% }
+% unless ($cgi->param('browse')) {
+ <& /elements/agent_transfer_link.html, {'list' => \@cust_main} &>
+% }
+
% if ( $cgi->param('referral_custnum') ) {
% $cgi->param('referral_custnum') =~ /^(\d+)$/
% or errorpage(emt("Illegal referral_custnum"));
diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html
index 4c7fa14aa..83ca7217d 100755
--- a/httemplate/search/cust_main.html
+++ b/httemplate/search/cust_main.html
@@ -161,4 +161,13 @@ if ( $FS::CurrentUser::CurrentUser->access_right('Bulk send customer notices') )
"${p}misc/email-customers.html?table=cust_main&classnums=invoice&$query";
}
+###
+# agent transfer link
+###
+
+my $agent_transfer_link = include('/elements/agent_transfer_link.html', {
+ 'search' => \%search_hash,
+});
+push @$menubar, emt('popup') => '<div style="display:inline-block">'.$agent_transfer_link.'</div>';
+
</%init>