From c6ef5a3a043c4fafa2f8d21028609f1b9b70eb47 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 22 Jun 2015 18:34:27 -0500 Subject: RT#34078: Payment History Report / Statement --- httemplate/misc/email-customers.html | 53 ++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 8 deletions(-) (limited to 'httemplate/misc/email-customers.html') diff --git a/httemplate/misc/email-customers.html b/httemplate/misc/email-customers.html index 83e86158f..d1d5ac735 100644 --- a/httemplate/misc/email-customers.html +++ b/httemplate/misc/email-customers.html @@ -1,3 +1,26 @@ +<%doc> + +Allows emailing one or more customers, based on a search for customers. Search can +be specified either through cust_main fields as cgi params, or through a base64 encoded +frozen hash in the 'search' cgi param. Form allows selecting an existing msg_template, +or creating a custom message, and shows a preview of the message before sending. +If linked to as a popup, include the cgi parameter 'popup' for proper header handling. + +This may also be used as an element in other pages, enabling you to pass along +additional substitution parameters to a message template, with the following options: + +form_action - the URL to submit the form to + +sub_param_process - subroutine to override cgi param values (such as msgnum) +and parse/delete additional form fields from the cgi; should return a %sub_param +hash to be passed along for message substitution + +alternate_form - an alternate form for template selection/message creation + +title - the title of the page + + + % if ($popup) { <% include('/elements/header-popup.html', $title) %> % } else { @@ -5,13 +28,16 @@ % } -
+ %# Mixing search params with from address, subject, etc. required special-case %# handling of those, risked name conflicts, and caused massive problems with %# multi-valued search params. We are no longer in search context, so we %# pack the search into a Storable string for later use. +% if (%sub_param) { + +% } @@ -21,7 +47,7 @@ <% include('/elements/progress-init.html', 'OneTrueForm', - [ qw( search table from subject html_body text_body msgnum ) ], + [ qw( search table from subject html_body text_body msgnum sub_param ) ], 'process/email-customers.html', $pdest, ) @@ -93,6 +119,10 @@ % } +% } elsif ($alternate_form) { + +<% $alternate_form %> + % } else {