diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-02-04 13:10:46 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-02-04 13:10:46 -0800 |
commit | bb6062a26c2d6ec9a2aef2455be1f93719764e0c (patch) | |
tree | 4afbd7f83d7e3368b5110f10946ce1e4ec8f9d49 /httemplate/edit/cust_main | |
parent | 9a14161203e3fb6f4733d3554d66dcdc1486fe23 (diff) |
fix stickiness of contact info on errors when editing customer, backport/byproduct of 4.x work on #27943
Diffstat (limited to 'httemplate/edit/cust_main')
-rw-r--r-- | httemplate/edit/cust_main/contacts_new.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/httemplate/edit/cust_main/contacts_new.html b/httemplate/edit/cust_main/contacts_new.html index f59126a66..cbeb1e97a 100644 --- a/httemplate/edit/cust_main/contacts_new.html +++ b/httemplate/edit/cust_main/contacts_new.html @@ -36,8 +36,8 @@ my $m2_error_callback = sub { my($cgi, $object) = @_; #process_o2m fields in process/cust_main-contacts.html - my @fields = qw( first last title comment ); - my @gfields = ( '', map "_$_", @fields ); + my $fields = FS::contact->cgi_contact_fields; + my @gfields = ( '', map "_$_", @$fields ); map { if ( /^contactnum(\d+)$/ ) { @@ -45,7 +45,7 @@ my $m2_error_callback = sub { if ( grep $cgi->param("contactnum$num$_"), @gfields ) { my $x = new FS::contact { 'contactnum' => scalar($cgi->param("contactnum$num")), - map { $_ => scalar($cgi->param("contactnum${num}_$_")) } @fields, + map { $_ => scalar($cgi->param("contactnum${num}_$_")) } @$fields, }; $x; } else { |