diff options
Diffstat (limited to 'httemplate/misc/email-customers-history.html')
| -rw-r--r-- | httemplate/misc/email-customers-history.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/httemplate/misc/email-customers-history.html b/httemplate/misc/email-customers-history.html new file mode 100644 index 000000000..2f9a38d23 --- /dev/null +++ b/httemplate/misc/email-customers-history.html @@ -0,0 +1,51 @@ + + <% include('email-customers.html', + 'form_action' => 'email-customers-history.html', + 'sub_param_process' => $sub_param_process, + 'alternate_form' => $alternate_form, + 'title' => 'Send payment history', + ) + %> + +<%init> + +my $sub_param_process = sub { + my $conf = shift; + my %sub_param; + foreach my $field ( qw( start_date end_date ) ) { + $sub_param{'payment_history'}->{$field} = parse_datetime($cgi->param($field)); + $cgi->delete($field); + } + $cgi->param('msgnum',$conf->config('payment_history_msgnum')); + return %sub_param; +}; + +my $alternate_form = sub { + my %sub_param = @_; + # this could maaaybe be a separate element, for cleanliness + # but it's really only for use by this page, and it's not overly complicated + my $noinit = 0; + return join("\n", + '<TABLE BORDER="0">', + ( + map { + my $label = ucfirst($_); + $label =~ s/_/ /; + include('/elements/tr-input-date-field.html',{ + 'name' => $_, + 'value' => $sub_param{'payment_history'}->{$_} || '', + 'label' => $label, + 'noinit' => $noinit++ + }); + } + qw( start_date end_date ) + ), + '</TABLE>', + '<INPUT TYPE="hidden" NAME="msgnum" VALUE="' . $cgi->param('msgnum') . '">', + '<INPUT TYPE="hidden" NAME="action" VALUE="preview">', + '<INPUT TYPE="submit" VALUE="Preview notice">', + ); +}; + +</%init> + |
