projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aeb90ad
)
fix error editing customers w/contacts -- contacts can be shared among customers...
author
Ivan Kohler
<ivan@freeside.biz>
Wed, 4 Feb 2015 20:07:24 +0000
(12:07 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Wed, 4 Feb 2015 20:07:24 +0000
(12:07 -0800)
httemplate/edit/cust_main/contacts_new.html
patch
|
blob
|
history
diff --git
a/httemplate/edit/cust_main/contacts_new.html
b/httemplate/edit/cust_main/contacts_new.html
index
f59126a
..
0ab02b4
100644
(file)
--- a/
httemplate/edit/cust_main/contacts_new.html
+++ b/
httemplate/edit/cust_main/contacts_new.html
@@
-11,6
+11,7
@@
{ 'field' => 'contactnum',
'type' => 'contact',
'colspan' => 6,
{ 'field' => 'contactnum',
'type' => 'contact',
'colspan' => 6,
+ 'custnum' => $opt{cust_main}->custnum,
'm2m_method' => 'cust_contact',
'm2m_dstcol' => 'contactnum',
'm2_label' => 'Contact',
'm2m_method' => 'cust_contact',
'm2m_dstcol' => 'contactnum',
'm2_label' => 'Contact',
@@
-36,8
+37,8
@@
my $m2_error_callback = sub {
my($cgi, $object) = @_;
#process_o2m fields in process/cust_main-contacts.html
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+)$/ ) {
map {
if ( /^contactnum(\d+)$/ ) {
@@
-45,7
+46,7
@@
my $m2_error_callback = sub {
if ( grep $cgi->param("contactnum$num$_"), @gfields ) {
my $x = new FS::contact {
'contactnum' => scalar($cgi->param("contactnum$num")),
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 {
};
$x;
} else {