diff options
author | jeff <jeff> | 2007-11-28 20:19:31 +0000 |
---|---|---|
committer | jeff <jeff> | 2007-11-28 20:19:31 +0000 |
commit | 5e5da406c19d7674e3ae959a5a772aa9d2339d0a (patch) | |
tree | 4f4ecb78549c803dea42cd228f33b7c4ff2470f5 /httemplate/edit | |
parent | d5967ae3ecfdb0bb1ead8176cfb2760a65c51f2d (diff) |
better select multiple, discourage creation of packages no agent can sell
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-x | httemplate/edit/part_pkg.cgi | 4 | ||||
-rwxr-xr-x | httemplate/edit/process/part_pkg.cgi | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index ab2407b4d..410c81d49 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -122,8 +122,8 @@ Line-item revenue recognition 'table' => 'agent_type', 'name_col' => 'atype', 'value' => \@agent_type, - 'empty_label' => 'select agent types', - 'element_etc' => 'multiple size="10"', + 'multiple' => '1', + 'element_etc' => 'size="10"', ) %> </TD> diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index 5d9c2355b..e4cf45984 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -36,6 +36,11 @@ % /^(\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 { |