blob: 2ff38ca530da194e6f136250aab75c91ff981e75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
<% include('/elements/header-popup.html', 'Bulk package change') %>
<% include('/elements/init_overlib.html') %>
<% include('/elements/progress-init.html',
'OneTrueForm',
[qw( old_pkgpart new_pkgpart )],
'process/bulk-cust_pkg.cgi',
$p.'browse/part_pkg.cgi',
)
%>
<SCRIPT TYPE="text/javascript">
function areyousure() {
var warning = 'Change these packages?';
if(confirm(warning)) {
process();
}
}
</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";
%
<INPUT NAME="old_pkgpart" TYPE="hidden" VALUE="<% $old_pkgpart %>">
Change <B><% $src_part_pkg->pkg_comment %></B><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 %>
% }
</SELECT>
<BR>
<BR>
%#<INPUT TYPE="checkbox" NAME="keep_dates" CHECKED> Preserve all billing dates <I>(strongly recommended)</I>
%#<BR>
%#<BR>
<INPUT TYPE="button" VALUE="Bulk change packages" onclick="areyousure()">
</FORM>
<% include('/elements/footer.html') %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
</%init>
|