summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/elements
diff options
context:
space:
mode:
authorjeff <jeff>2007-01-19 16:31:21 +0000
committerjeff <jeff>2007-01-19 16:31:21 +0000
commita54aa62df5076e113134e06e11ba9776c3e60a36 (patch)
tree563c8e11c66442bda805132f97559bfea175428c /httemplate/edit/process/elements
parent13a6b896a3f9d0137ade340c4be89b04d127b345 (diff)
no password in html source on employee edit
Diffstat (limited to 'httemplate/edit/process/elements')
-rw-r--r--httemplate/edit/process/elements/process.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html
index 4b1d2c840..5d40bba50 100644
--- a/httemplate/edit/process/elements/process.html
+++ b/httemplate/edit/process/elements/process.html
@@ -24,6 +24,8 @@
% # '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, ... ],
+% #
% # 'process_m2m' => { 'link_table' => 'link_table_name',
% # 'target_table' => 'target_table_name',
% # },
@@ -55,6 +57,13 @@
% } @$fields
% } );
%
+% 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));
+% }
+% }
+%
% my $error;
% if ( $pkeyvalue ) {
% $error = $new->replace($old);