[freeside-commits] freeside/httemplate/edit/process/elements process.html, 1.8, 1.9

Jeff Finucane,420,, jeff at wavetail.420.am
Fri Jan 19 14:02:23 PST 2007


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process/elements
In directory wavetail:/tmp/cvs-serv5194/elements

Modified Files:
	process.html 
Log Message:
blank password on error

Index: process.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/elements/process.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- process.html	19 Jan 2007 16:31:21 -0000	1.8
+++ process.html	19 Jan 2007 22:02:21 -0000	1.9
@@ -24,7 +24,9 @@
 %  # 'edit_ext' => 'html', #defaults to 'html', you might want 'cgi' while the
 %  #                       #naming is still inconsistent
 %  # 
-%  # 'copy_on_empty' => [ old_field_name, another_old_field, ... ],
+%  # 'copy_on_empty'  => [ 'old_field_name', 'another_old_field', ... ],
+%  # 
+%  # 'clear_on_error' => [ 'form_field1', 'form_field2', ... ],
 %  # 
 %  # 'process_m2m' => { 'link_table'   => 'link_table_name',
 %  #                    'target_table' => 'target_table_name',
@@ -57,7 +59,7 @@
 %    } @$fields
 %  } );
 %
-%  if ($old && scalar($opt{'copy_on_empty'})) {
+%  if ($old && scalar(@{$opt{'copy_on_empty'}})) {
 %    foreach my $field (@{$opt{'copy_on_empty'}}) {
 %      $new->set($field, $old->get($field))
 %        unless scalar($cgi->param($field));
@@ -88,6 +90,11 @@
 %
 %  if ( $error ) {
 %    $cgi->param('error', $error);
+%    if (scalar(@{$opt{'clear_on_error'}})) {
+%      foreach my $field (@{$opt{'clear_on_error'}}) {
+%        $cgi->param($field, '')
+%      }
+%    }
 %    my $edit_ext = $opt{'edit_ext'} || 'html';
 %    my $url = $opt{'error_redirect'} || popurl(2)."$table.$edit_ext?";
 %    print $cgi->redirect($url. $cgi->query_string );



More information about the freeside-commits mailing list