X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fmisc%2Femail-customers.html;h=d1d5ac735eb99cf66a40263cbd98a6b2d9828854;hb=0be0b02db98ed06dabe51805fe45b2e9704327b8;hp=83e86158fe2241bd7a7531faf5e24f0f80b47193;hpb=e7c1b3f96941e30898bf0e8b4dd25abc1859757c;p=freeside.git 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 {