summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/edit/process/part_pkg.cgi23
-rw-r--r--httemplate/elements/tr-select-agent_type.html12
2 files changed, 16 insertions, 19 deletions
diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi
index 932e33b1d..9eb10d276 100755
--- a/httemplate/edit/process/part_pkg.cgi
+++ b/httemplate/edit/process/part_pkg.cgi
@@ -50,8 +50,7 @@ my $precheck_callback = sub {
}
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');
@@ -232,18 +231,16 @@ foreach my $override_class ($cgi->param) {
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 = (
{
diff --git a/httemplate/elements/tr-select-agent_type.html b/httemplate/elements/tr-select-agent_type.html
index 3fcbcd388..400cb4ebb 100644
--- a/httemplate/elements/tr-select-agent_type.html
+++ b/httemplate/elements/tr-select-agent_type.html
@@ -1,8 +1,8 @@
-%#% if ( scalar(@agent_types) == 1 ) {
-%#
-%# <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'typenum' %>" VALUE="<% $agent_types[0]->typenum %>">
-%#
-%#% } else {
+% if ( scalar(@agent_types) == 1 ) {
+
+ <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'typenum' %>" VALUE="<% $agent_types[0]->typenum %>">
+
+% } else {
<TR>
<TD ALIGN="right"><% $opt{'label'} || 'Agent Type' %></TD>
@@ -15,7 +15,7 @@
</TD>
</TR>
-%#% }
+% }
<%init>