[freeside-commits] branch FREESIDE_4_BRANCH updated. 4052162cbd8882b53fd4a33d9f6b9ea2a9ef9561

Christopher Burger burgerc at freeside.biz
Wed Dec 27 12:44:44 PST 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  4052162cbd8882b53fd4a33d9f6b9ea2a9ef9561 (commit)
      from  f608ed11658a0dff24d88e151756820e697352dd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4052162cbd8882b53fd4a33d9f6b9ea2a9ef9561
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Thu Dec 21 18:16:33 2017 -0500

    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 70ab25545..4b3f83817 100644
--- a/httemplate/edit/elements/edit.html
+++ b/httemplate/edit/elements/edit.html
@@ -871,7 +871,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 = {};
 
@@ -914,7 +916,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 )

-----------------------------------------------------------------------

Summary of changes:
 httemplate/edit/elements/edit.html | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list