diff options
Diffstat (limited to 'httemplate/elements/email-link.html')
-rw-r--r-- | httemplate/elements/email-link.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/httemplate/elements/email-link.html b/httemplate/elements/email-link.html new file mode 100644 index 000000000..692e5bc2e --- /dev/null +++ b/httemplate/elements/email-link.html @@ -0,0 +1,16 @@ +% if ( $FS::CurrentUser::CurrentUser->access_right('Bulk send customer notices') ) { +<A HREF="<%$p%>misc/email-customers.html?table=<%$table%>&<%$query%>"><%$label%></A> +% } +<%init> +my %opt = @_; +my $table = $opt{'table'}; +my $search_hash = $opt{'search_hash'}; +die "'table' required" if !$table; +die "'search_hash' required" if !$search_hash; + +my $uri = new URI; +$uri->query_form($search_hash); +my $query = $uri->query; +my $label = ($opt{'label'} || 'Email a notice to these customers'); +</%init> + |