From 6c9cd1c36adbb9fc950fcf0a0b269fa6f16838a1 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 17 Sep 2010 18:12:08 +0000 Subject: email_search_result for cust_pkg and svc_broadband, RT#8736 --- httemplate/elements/email-link.html | 16 ++++++++++++++++ httemplate/elements/menu.html | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 httemplate/elements/email-link.html (limited to 'httemplate/elements') 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') ) { +<%$label%> +% } +<%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'); + + diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 7cd6f898c..d3e00f3de 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -185,7 +185,7 @@ foreach my $svcdb ( FS::part_svc->svc_tables() ) { ]; } - if ( $svcdb eq 'svc_acct' ) { + if ( $svcdb eq 'svc_acct' || $svcdb eq 'svc_broadband' ) { $report_svc{"Advanced $lcsname reports"} = [ $fsurl."search/report_$svcdb.html", '' ]; } -- cgit v1.2.1