diff options
author | ivan <ivan> | 2005-12-01 19:17:05 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-12-01 19:17:05 +0000 |
commit | 4e368de88b732462775637b06377d9bdbe2712ed (patch) | |
tree | 536d00cc8bf95bd41bab0b966c3fbeaf6132d9ce | |
parent | 6493931f3663cfc065cbf5aeca75539d03842381 (diff) |
list disabled packages on agent type edit if they are still associated with the type
-rwxr-xr-x | httemplate/edit/agent_type.cgi | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/httemplate/edit/agent_type.cgi b/httemplate/edit/agent_type.cgi index 684216335..84f4b6599 100755 --- a/httemplate/edit/agent_type.cgi +++ b/httemplate/edit/agent_type.cgi @@ -37,7 +37,15 @@ Agent Type Select which packages agents of this type may sell to customers<BR> -<% foreach my $part_pkg ( qsearch('part_pkg',{ 'disabled' => '' }) ) { %> +<% foreach my $part_pkg ( + qsearch({ 'table' => 'part_pkg', + 'hashref' => { 'disabled' => '' }, + 'select' => 'part_pkg.*', + 'addl_from' => 'LEFT JOIN type_pkgs USING ( pkgpart )', + 'extra_sql' => 'OR typenum = '. $agent_type->typenum, + }) + ) { +%> <BR> <INPUT TYPE="checkbox" NAME="pkgpart<%= $part_pkg->pkgpart %>" <%= @@ -50,7 +58,8 @@ Select which packages agents of this type may sell to customers<BR> %> VALUE="ON"> <A HREF="<%= $p %>edit/part_pkg.cgi?<%= $part_pkg->pkgpart %>"><%= $part_pkg->pkgpart %>: - <%= $part_pkg->pkg %> (<%= $part_pkg->comment %>)</A> + <%= $part_pkg->pkg %> - <%= $part_pkg->comment %></A> + <%= $part_pkg->disabled =~ /^Y/i ? ' (DISABLED)' : '' %> <% } %> |