From: Ivan Kohler Date: Thu, 11 Jan 2018 06:46:31 +0000 (-0800) Subject: Merge branch 'master' of git.freeside.biz:/home/git/freeside X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=77daf007ef522ae71041d9b094643cf868d8ecce;hp=-c Merge branch 'master' of git.freeside.biz:/home/git/freeside --- 77daf007ef522ae71041d9b094643cf868d8ecce diff --combined httemplate/edit/elements/edit.html index 2f82f9c99,113f611e1..8ba703a2f --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@@ -358,7 -358,6 +358,7 @@@ Example % #contact % 'custnum' => $f->{'custnum'}, % 'prospectnum' => $f->{'prospectnum'}, +% % ); % % $include_common{$_} = $f->{$_} foreach grep exists($f->{$_}), @@@ -371,7 -370,7 +371,7 @@@ % qw( formatted_value ), #fixed % qw( country ), #select-country % qw( width height config ), #htmlarea -% qw( alt_format ), #select-cust_location +% qw( is_optional alt_format ), #select-cust_location % qw( classnum ), # select-inventory_item % qw( aligned ), # columnstart % qw( debug ), # select-table @@@ -872,7 -871,9 +872,9 @@@ my $pkey = dbdef->table($table)->primar my $fields = $opt{'fields'} #|| [ grep { $_ ne $pkey } dbdef->table($table)->columns ]; || [ grep { $_ ne $pkey } fields($table) ]; - #my @actualfields = map { ref($_) ? $_->{'field'} : $_ } @$fields; + my @actualfields = map { ref($_) ? $_->{'field'} : $_ } @$fields; + + push @actualfields, $pkey; my $js_form_validate = {}; @@@ -915,7 -916,7 +917,7 @@@ if ( $opt{'embed'} ) $mode = 'error'; $object = $class->new( { - map { $_ => scalar($cgi->param($_)) } fields($table) + map { $_ => scalar($cgi->param($_)) } @actualfields }); &{$opt{'error_callback'}}( $cgi, $object, $fields, \%opt )