diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-08-25 21:25:15 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-08-25 21:25:15 -0500 |
commit | c13a7adf63cc830d092bbf4a8e9bda2aa3beee56 (patch) | |
tree | fd3227e42391729c845ac6c4e691e8435bce78c8 | |
parent | f4fc0bd2f813272ed1a878dd9f130fe155a6e3ff (diff) |
RT#18361: Delay package from billing until services are provisioned [bug fix to javascript]
-rw-r--r-- | httemplate/elements/tr-pkg_svc.html | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/httemplate/elements/tr-pkg_svc.html b/httemplate/elements/tr-pkg_svc.html index 1e9c0a38b..7ac67b7ec 100644 --- a/httemplate/elements/tr-pkg_svc.html +++ b/httemplate/elements/tr-pkg_svc.html @@ -1,15 +1,14 @@ <TR> <TD CLASS="background" COLSPAN=99> -<% itable('', 4, 1) %><TR><TD VALIGN="top"> -<% $thead %> - <SCRIPT> var provision_hold_td = []; var provision_hold_input = []; -provision_hold_td.push(document.getElementById('th_provision_hold')); </SCRIPT> +<% itable('', 4, 1) %><TR><TD VALIGN="top"> +<% pkg_svc_thead() %> + %foreach my $part_svc ( @part_svc ) { % my $svcpart = $part_svc->svcpart; % my $pkg_svc = $pkg_svc{$svcpart} @@ -97,7 +96,7 @@ provision_hold_input.push(document.getElementById('input_provision_hold<% $svcpa % if ( $count == int( $_ * scalar(@part_svc) / $columns ) ) { % - </TABLE></TD><TD VALIGN="top"><% $thead %> + </TABLE></TD><TD VALIGN="top"><% pkg_svc_thead() %> % } % } % $count++; @@ -161,15 +160,21 @@ provision_hold_init(); my %opt = @_; my $cgi = $opt{'cgi'}; -my $thead = "\n\n". ntable('#cccccc', 2). - '<TR>'. - '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Quan.</FONT></TH>'. - '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Primary</FONT></TH>'. - '<TH BGCOLOR="#dcdcdc">Service</TH>'. - '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Hide<BR>from<BR>Invoices</FONT></TH>'. - '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Bulk<BR>Charge</FONT></TH>'. - '<TH BGCOLOR="#dcdcdc" ID="th_provision_hold"><FONT SIZE=-1>Remove Hold After Provisioning</FONT></TH>'. - '</TR>'; +my $thead_count = 0; +sub pkg_svc_thead { + $thead_count += 1; + return "\n\n". ntable('#cccccc', 2). + '<TR>'. + '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Quan.</FONT></TH>'. + '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Primary</FONT></TH>'. + '<TH BGCOLOR="#dcdcdc">Service</TH>'. + '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Hide<BR>from<BR>Invoices</FONT></TH>'. + '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Bulk<BR>Charge</FONT></TH>'. + '<TH BGCOLOR="#dcdcdc" ID="th_provision_hold' . $thead_count . '"><FONT SIZE=-1>Remove Hold After Provisioning</FONT></TH>'. + '</TR>'. + qq!<SCRIPT>provision_hold_td.push(document.getElementById('th_provision_hold$thead_count'))</SCRIPT>!; +; +} my $part_pkg = $opt{'object'}; my $pkgpart = $part_pkg->pkgpart; |