ticket 1427, automatically email excel a/r report (backport)
authorjeff <jeff>
Wed, 21 Mar 2007 01:35:32 +0000 (01:35 +0000)
committerjeff <jeff>
Wed, 21 Mar 2007 01:35:32 +0000 (01:35 +0000)
httemplate/pref/pref-process.html
httemplate/pref/pref.html

index ed33509..a5e13f0 100644 (file)
 %
 % }
 %
+% #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 ) {
index 507a897..ec8aefd 100644 (file)
@@ -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>