X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Femail-link.html;h=012afff1ae384e9a1adf6ab28e3c0c7bfbdd432c;hb=70203e3be5de0331ba031d94972c274183c595d2;hp=2612faabb8480c71212910db90cba40bd0ff8636;hpb=4aa7ddaf3e491d34a8caaa7869ccd83dc6d50d52;p=freeside.git diff --git a/httemplate/elements/email-link.html b/httemplate/elements/email-link.html index 2612faabb..012afff1a 100644 --- a/httemplate/elements/email-link.html +++ b/httemplate/elements/email-link.html @@ -1,17 +1,19 @@ % if ( $FS::CurrentUser::CurrentUser->access_right('Bulk send customer notices') ) { -<%$label%> +<%$label%> % } <%init> my %opt = @_; -my $table = $opt{'table'}; -my $agent_virt_agentnum = $opt{'agent_virt_agentnum'}; my $search_hash = $opt{'search_hash'}; -die "'table' required" if !$table; +die "'table' required" if !$opt{'table'}; die "'search_hash' required" if !$search_hash; my $uri = new URI; -$uri->query_form($search_hash); -my $query = $uri->query; +my @params = map { $_, $search_hash->{$_} } sort keys %$search_hash; +$uri->query_form( @params, + table => $opt{'table'}, + agent_virt_agentnum => $opt{'agent_virt_agentnum'} + ); +my $query = $m->scomp('/elements/create_uri_query', query=>$uri->query); my $label = ($opt{'label'} || 'Email a notice to these customers');