This commit was generated by cvs2svn to compensate for changes in r11022,
[freeside.git] / httemplate / edit / bulk-cust_pkg.html
1 <% include('/elements/header-popup.html', 'Bulk package change') %>
2
3 <% include('/elements/init_overlib.html') %>
4
5 <% include('/elements/progress-init.html',
6               'OneTrueForm',
7               [qw( old_pkgpart new_pkgpart )],
8               'process/bulk-cust_pkg.cgi',
9               $p.'browse/part_pkg.cgi',
10            )
11 %>
12
13 <SCRIPT TYPE="text/javascript">
14 function areyousure() {
15   var warning = 'Change these packages?';
16   if(confirm(warning)) {
17     process();
18   }
19 }
20 </SCRIPT>
21 <FORM NAME="OneTrueForm">
22 % #false laziness with bulk-cust_svc.html
23 %  $cgi->param('pkgpart') =~ /^(\d+)$/
24 %    or die "illegal pkgpart: ". $cgi->param('pkgpart');
25 %
26 %  my $old_pkgpart = $1;
27 %  my $src_part_pkg = qsearchs('part_pkg', { 'pkgpart' => $old_pkgpart } )
28 %    or die "unknown pkgpart: $old_pkgpart";
29 %
30
31
32 <INPUT NAME="old_pkgpart" TYPE="hidden" VALUE="<% $old_pkgpart %>">
33 Change <B><% $src_part_pkg->pkg_comment %></B><BR>
34
35 to new package definition
36 <SELECT NAME="new_pkgpart">
37 % foreach my $dest_part_pkg ( qsearch('part_pkg', { 'disabled' => '' } ) ) {
38
39   <OPTION VALUE="<% $dest_part_pkg->pkgpart %>"><% $dest_part_pkg->pkgpart %>: <% $dest_part_pkg->pkg %>
40 % } 
41
42 </SELECT>
43 <BR>
44 <BR>
45 %#<INPUT TYPE="checkbox" NAME="keep_dates" CHECKED> Preserve all billing dates <I>(strongly recommended)</I>
46 %#<BR>
47 %#<BR>
48
49 <INPUT TYPE="button" VALUE="Bulk change packages" onclick="areyousure()">
50
51 </FORM>
52
53 <% include('/elements/footer.html') %>
54
55 <%init>
56
57 die "access denied"
58   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
59
60 </%init>