better select multiple, discourage creation of packages no agent can sell
[freeside.git] / httemplate / edit / process / part_pkg.cgi
index 5d9c235..e4cf459 100755 (executable)
 %  /^(\d+)$/;
 %  push @agents, $1 if $1;
 %}
+%$error = "At least one agent type must be specified."
+%  unless( scalar(@agents) ||
+%          $cgi->param('clone') && $cgi->param('clone') ~= /^\d+$/ ||
+%          !pkgpart && $conf->exists('agent-defaultpkg')
+%        );
 %
 %my $new = new FS::part_pkg ( {
 %  map {