diff options
| author | ivan <ivan> | 2009-02-09 01:49:28 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2009-02-09 01:49:28 +0000 | 
| commit | df676d82034cb63ff357f8d8ed0f95ce788fb98b (patch) | |
| tree | 11159ec986698a2b7b1b86cf1f68b4e0b67c5677 /httemplate/browse/part_pkg.cgi | |
| parent | 24533a22a23e211888fcc36a5177c0def5c77de3 (diff) | |
further work on agents editing own packages: fix fallout on package customization from turning agent_virt on in edit/part_pkg.cgi, add a "clone package" to package browse, like clone service, and have agent type selection disappear when you set an agentnum.  RT#1331
Diffstat (limited to 'httemplate/browse/part_pkg.cgi')
| -rwxr-xr-x | httemplate/browse/part_pkg.cgi | 23 | 
1 files changed, 7 insertions, 16 deletions
| diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index cdaa2c92a..1fed614a2 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -46,25 +46,11 @@ if ( $cgi->param('active') ) {  my $extra_sql = ''; -#false laziness w/elements/select-part_pkg.html -my $agentnums = join(',', $curuser->agentnums); -  unless ( $acl_edit_global ) { -  $extra_sql .= " -    WHERE ( -      agentnum IS NOT NULL OR 0 < ( -        SELECT COUNT(*) -          FROM type_pkgs -            LEFT JOIN agent_type USING ( typenum ) -            LEFT JOIN agent AS typeagent USING ( typenum ) -          WHERE type_pkgs.pkgpart = part_pkg.pkgpart -            AND typeagent.agentnum IN ($agentnums) -      ) -    ) -  "; +  $extra_sql .= ' WHERE '.  FS::part_pkg->curuser_pkgs_sql;  } -#eofalse +my $agentnums = join(',', $curuser->agentnums);  my $count_cust_pkg = "    SELECT COUNT(*) FROM cust_pkg LEFT JOIN cust_main USING ( custnum )      WHERE cust_pkg.pkgpart = part_pkg.pkgpart @@ -97,7 +83,12 @@ my $html_init;      One or more service definitions are grouped together into a package       definition and given pricing information.  Customers purchase packages      rather than purchase services directly.<BR><BR> +    <FORM METHOD="POST" ACTION="${p}edit/part_pkg.cgi">      <A HREF="${p}edit/part_pkg.cgi"><I>Add a new package definition</I></A> +    or +    !.include('/elements/select-part_pkg.html', 'element_name' => 'clone' ). qq! +    <INPUT TYPE="submit" VALUE="Clone existing package"> +    </FORM>      <BR><BR>    !;  #} | 
