diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2018-10-01 12:03:01 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2018-10-01 12:03:01 -0700 |
| commit | d5988a9f7a3617de33da3058f2e9f1151b24420e (patch) | |
| tree | 3ed8d80cd6a81f160c76c90fcf089e81fe7ffddf /httemplate/edit/bulk-cust_pkg.html | |
| parent | 1ab515df162a76347d8146cae4ff34656cc4bcd3 (diff) | |
| parent | b6088672c87e2c5984183326b4c0e2d9bd6c34f6 (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit/bulk-cust_pkg.html')
| -rw-r--r-- | httemplate/edit/bulk-cust_pkg.html | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/httemplate/edit/bulk-cust_pkg.html b/httemplate/edit/bulk-cust_pkg.html index 2ff38ca53..8a082f47f 100644 --- a/httemplate/edit/bulk-cust_pkg.html +++ b/httemplate/edit/bulk-cust_pkg.html @@ -19,24 +19,18 @@ function areyousure() { } </SCRIPT> <FORM NAME="OneTrueForm"> -% #false laziness with bulk-cust_svc.html -% $cgi->param('pkgpart') =~ /^(\d+)$/ -% or die "illegal pkgpart: ". $cgi->param('pkgpart'); -% -% my $old_pkgpart = $1; -% my $src_part_pkg = qsearchs('part_pkg', { 'pkgpart' => $old_pkgpart } ) -% or die "unknown pkgpart: $old_pkgpart"; -% +% foreach my $src_part_pkg (@src_part_pkg) { + <INPUT NAME="old_pkgpart" TYPE="hidden" VALUE="<% $src_part_pkg->pkgpart %>"> + Change <B><% $src_part_pkg->pkg_comment |h %></B><BR> +% } -<INPUT NAME="old_pkgpart" TYPE="hidden" VALUE="<% $old_pkgpart %>"> -Change <B><% $src_part_pkg->pkg_comment %></B><BR> - +<BR> to new package definition <SELECT NAME="new_pkgpart"> % foreach my $dest_part_pkg ( qsearch('part_pkg', { 'disabled' => '' } ) ) { - <OPTION VALUE="<% $dest_part_pkg->pkgpart %>"><% $dest_part_pkg->pkgpart %>: <% $dest_part_pkg->pkg %> + <OPTION VALUE="<% $dest_part_pkg->pkgpart %>"><% $dest_part_pkg->pkgpart %>: <% $dest_part_pkg->pkg |h %> % } </SELECT> @@ -57,4 +51,18 @@ to new package definition die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +my @src_part_pkg = (); +foreach my $pkgpart ( $cgi->multi_param('pkgpart') ) { + + $pkgpart =~ /^(\d+)$/ + or die "illegal pkgpart: $pkgpart"; + + my $old_pkgpart = $1; + my $src_part_pkg = qsearchs('part_pkg', { 'pkgpart' => $old_pkgpart } ) + or die "unknown pkgpart: $old_pkgpart"; + + push @src_part_pkg, $src_part_pkg; + +} + </%init> |
