diff options
author | jeff <jeff> | 2007-02-08 01:46:45 +0000 |
---|---|---|
committer | jeff <jeff> | 2007-02-08 01:46:45 +0000 |
commit | 83a6a677f62ca501011d9bac6371344dbb5a13b3 (patch) | |
tree | 1608249d6e0855dd24c3c9a7609ddad6ba3a0590 /httemplate/edit/process | |
parent | 10fdcf4c76e4dd14f7fb738665e3fb401af3c28a (diff) |
agent type on package add/edit (ticket 1446)
Diffstat (limited to 'httemplate/edit/process')
-rwxr-xr-x | httemplate/edit/process/part_pkg.cgi | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index 204c751d9..1158222b6 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -17,6 +17,12 @@ % $cgi->param($_, '') unless defined $cgi->param($_); %} % +%my @agents; +%foreach ($cgi->param('agent_type')) { +% /^(\d+)$/; +% push @agents, $1 if $1; +%} +% %my $new = new FS::part_pkg ( { % map { % $_ => scalar($cgi->param($_)); @@ -49,6 +55,13 @@ % $pkgpart = $new->pkgpart; %} % +%unless ($error) { +% my $error = $new->process_m2m( +% 'link_table' => 'type_pkgs', +% 'target_table' => 'agent_type', +% 'params' => \@agents, +% ); +%} %if ( $error ) { % $cgi->param('error', $error ); % print $cgi->redirect(popurl(2). "part_pkg.cgi?". $cgi->query_string ); |