'precheck_callback' => $precheck_callback,
'args_callback' => $args_callback,
'process_m2m' => \@process_m2m,
+ 'process_o2m' => \@process_o2m,
)
%>
<%init>
}
return "At least one agent type must be specified."
unless scalar(@agents)
- || ( $cgi->param('clone') && $cgi->param('clone') =~ /^\d+$/ )
- || ( !$cgi->param('pkgpart') && $conf->exists('agent-defaultpkg') )
+ #wtf? || ( $cgi->param('clone') && $cgi->param('clone') =~ /^\d+$/ )
|| $cgi->param('disabled')
|| $cgi->param('agentnum');
my $conf = new FS::Conf;
-if ( $cgi->param('pkgpart') || ! $conf->exists('agent_defaultpkg') ) {
- my @agents = ();
- foreach ($cgi->param('agent_type')) {
- /^(\d+)$/;
- push @agents, $1 if $1;
- }
- push @process_m2m, {
- 'link_table' => 'type_pkgs',
- 'target_table' => 'agent_type',
- 'params' => \@agents,
- };
+my @agents = ();
+foreach ($cgi->param('agent_type')) {
+ /^(\d+)$/;
+ push @agents, $1 if $1;
}
+push @process_m2m, {
+ 'link_table' => 'type_pkgs',
+ 'target_table' => 'agent_type',
+ 'params' => \@agents,
+};
+
+my @process_o2m = (
+ {
+ 'table' => 'part_pkg_msgcat',
+ 'fields' => [qw( locale pkg )],
+ },
+);
</%init>