diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-08-25 01:17:24 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-08-25 23:36:55 -0500 |
commit | fec109316e1aa49651b72fd31cc938d2ea6ee5cf (patch) | |
tree | 12cdd9e71166dc6ec962a133aa0e0e833f3819d0 | |
parent | 147d171069905e80a47442ee4b35515534989909 (diff) |
RT#18361: Delay package from billing until services are provisioned [v3 merge]
-rw-r--r-- | httemplate/elements/tr-pkg_svc.html | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/httemplate/elements/tr-pkg_svc.html b/httemplate/elements/tr-pkg_svc.html index b3bf80212..c355c2051 100644 --- a/httemplate/elements/tr-pkg_svc.html +++ b/httemplate/elements/tr-pkg_svc.html @@ -4,6 +4,12 @@ <% 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> + %foreach my $part_svc ( @part_svc ) { % my $svcpart = $part_svc->svcpart; % my $pkg_svc = $pkg_svc{$svcpart} @@ -61,9 +67,13 @@ <INPUT TYPE="checkbox" NAME="hidden<% $svcpart %>" VALUE="Y"<% $pkg_svc->hidden =~ /^Y/i ? ' CHECKED' : ''%>> </TD> - <TD ALIGN="center"> - <INPUT TYPE="checkbox" NAME="provision_hold<% $svcpart %>" VALUE="Y"<% $provision_hold =~ /^Y/i ? ' CHECKED' : ''%>> + <TD ALIGN="center" ID="td_provision_hold<% $svcpart %>"> + <INPUT TYPE="checkbox" ID="input_provision_hold<% $svcpart %>" NAME="provision_hold<% $svcpart %>" VALUE="Y"<% $provision_hold =~ /^Y/i ? ' CHECKED' : ''%>> </TD> +<SCRIPT> +provision_hold_td.push(document.getElementById('td_provision_hold<% $svcpart %>')); +provision_hold_input.push(document.getElementById('input_provision_hold<% $svcpart %>')); +</SCRIPT> </TR> % foreach ( 1 .. $columns-1 ) { @@ -75,10 +85,31 @@ % } % $count++; % -% } +% } # foreach $part_svc </TR></TABLE></TD></TR></TABLE> +<SCRIPT> +// start_on_hold from edit/part_pkg.cgi +// toggles display of provision_hold checkboxes when that changes +function provision_hold_check () { + var start_on_hold = document.getElementById('start_on_hold'); + if (start_on_hold) { + for (i = 0; i < provision_hold_td.length; i++) { + provision_hold_td[i].style.display = start_on_hold.checked ? '' : 'none'; + } + } +} +function provision_hold_init () { + var start_on_hold = document.getElementById('start_on_hold'); + if (start_on_hold) { + start_on_hold.onchange = provision_hold_check; + provision_hold_check(); + } +} +provision_hold_init(); +</SCRIPT> + % if ( scalar(@possible_exports) > 0 || scalar(@mapped_exports) > 0 ) { <TABLE><TR> <TH BGCOLOR="#dcdcdc">Export</TH> @@ -118,7 +149,7 @@ my $thead = "\n\n". ntable('#cccccc', 2). '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-2>Primary</FONT></TH>'. '<TH BGCOLOR="#dcdcdc">Service</TH>'. '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Hide</FONT></TH>'. - '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Hold<BR>Until<BR>Provision</FONT></TH>'. + '<TH BGCOLOR="#dcdcdc" ID="th_provision_hold"><FONT SIZE=-1>Remove Hold After Provisioning</FONT></TH>'. '</TR>'; my $part_pkg = $opt{'object'}; |