agent-virt "email a notice to this customer" from address, RT#27424
[freeside.git] / httemplate / elements / email-link.html
1 % if ( $FS::CurrentUser::CurrentUser->access_right('Bulk send customer notices') ) {
2 <A HREF="<%$p%>misc/email-customers.html?table=<%$table%>&agent_virt_agentnum=<%$agent_virt_agentnum%>&<%$query%>"><%$label%></A>
3 % }
4 <%init>
5 my %opt = @_;
6 my $table = $opt{'table'};
7 my $agent_virt_agentnum = $opt{'agent_virt_agentnum'};
8 my $search_hash = $opt{'search_hash'};
9 die "'table' required" if !$table;
10 die "'search_hash' required" if !$search_hash;
11
12 my $uri = new URI;
13 $uri->query_form($search_hash);
14 my $query = $uri->query;
15 my $label = ($opt{'label'} || 'Email a notice to these customers');
16 </%init>
17