From: Christopher Burger Date: Thu, 21 Dec 2017 23:16:33 +0000 (-0500) Subject: RT# 76878 - Fixed installer checkbox to be sticky on error. X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=2d2036a7e6ccab84985b3a7b28a7a9f2e788b313;p=freeside.git RT# 76878 - Fixed installer checkbox to be sticky on error. --- diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 099b0a57e..3826f9752 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -836,7 +836,9 @@ my $pkey = dbdef->table($table)->primary_key; #? $opt{'primary_key'} || 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 = {}; @@ -879,7 +881,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 )