summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeff <jeff>2007-03-21 01:35:32 +0000
committerjeff <jeff>2007-03-21 01:35:32 +0000
commitfeae6f6dff962a092787f0ad4c277b3d1fc20c1f (patch)
tree3ae8651590598537f98552dc94889c3f776025e4
parentb1f489cf1c617e0063c5b5f01117e54847ec7c17 (diff)
ticket 1427, automatically email excel a/r report (backport)
-rw-r--r--httemplate/pref/pref-process.html17
-rw-r--r--httemplate/pref/pref.html17
2 files changed, 29 insertions, 5 deletions
diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html
index ed3350971..a5e13f062 100644
--- a/httemplate/pref/pref-process.html
+++ b/httemplate/pref/pref-process.html
@@ -27,12 +27,19 @@
%
% }
%
+% #XXX autogen
+% my @paramlist = qw( menu_position email_address
+% height width availHeight availWidth colorDepth
+% );
+%
+% foreach (@paramlist) {
+% scalar($cgi->param($_)) =~ /^[,.\@\w]*$/ && next;
+% $error ||= "Illegal value for parameter $_";
+% last;
+% }
+%
% $error ||= $access_user->replace( {
-% map { $_ => scalar($cgi->param($_)) }
-% #XXX autogen
-% qw( menu_position
-% height width availHeight availWidth colorDepth
-% )
+% map { $_ => scalar($cgi->param($_)) } @paramlist,
% } );
%
% if ( $error ) {
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index 507a897d7..ec8aefd80 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -41,6 +41,20 @@ Interface
</TABLE>
<BR>
+Email Address
+ <% ntable("#cccccc",2) %>
+
+ <TR>
+ <TH>Email Address(es) (comma separated) </TH>
+ <TD>
+ <TD><INPUT TYPE="text" NAME="email_address" VALUE="<% $email_address %>">
+ </TD>
+ </TR>
+
+ </TABLE>
+ <BR>
+
+
% foreach my $prop (qw( height width availHeight availWidth colorDepth )) {
<INPUT TYPE="hidden" NAME="<% $prop %>" VALUE="">
<SCRIPT TYPE="text/javascript">
@@ -57,5 +71,8 @@ Interface
( $FS::CurrentUser::CurrentUser->option('menu_position') || 'left' )
=~ /^(\w+)$/ or die "illegal menu_position";
my $menu_position = $1;
+( $FS::CurrentUser::CurrentUser->option('email_address') )
+ =~ /^([,\w\@.]*)$/ or die "illegal email_address"; #too late
+my $email_address = $1;
</%init>