diff options
author | Mark Wells <mark@freeside.biz> | 2013-08-20 16:27:54 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-08-20 16:27:54 -0700 |
commit | 6db14d0fe65daec3d136edaa33a32a1fb24ba06a (patch) | |
tree | 1848846143c602604a5fb5e7ef19800dab2b7f64 /httemplate/misc | |
parent | 00d8adfeadef4eae18cc37b0b72dae4d14859b47 (diff) |
future package change: adjust behavior of date field, #20687
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-x | httemplate/misc/change_pkg.cgi | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi index 887fa014a..ce8348000 100755 --- a/httemplate/misc/change_pkg.cgi +++ b/httemplate/misc/change_pkg.cgi @@ -35,16 +35,32 @@ <FONT CLASS="fsinnerbox-title"><% mt('Change') |h %></FONT> <% ntable('#cccccc') %> + <SCRIPT TYPE="text/javascript"> + function delay_changed() { + var enable = document.OrderPkgForm.delay[1].checked; + document.getElementById('start_date_text').disabled = !enable; + document.getElementById('start_date_button').style.display = + (enable ? '' : 'none'); + document.getElementById('start_date_button_disabled').style.display = + (enable ? 'none' : ''); + } + <&| /elements/onload.js &> + delay_changed(); + </&> + </SCRIPT> <TR> -<!-- <TD> Apply this change: </TD> --> <TD> <INPUT TYPE="radio" NAME="delay" VALUE="0" \ - <% !$cgi->param('delay') ? 'CHECKED' : '' %>> Now </TD> + <% !$cgi->param('delay') ? 'CHECKED' : '' %> \ + onclick="delay_changed()"> Now </TD> <TD> <INPUT TYPE="radio" NAME="delay" VALUE="1" \ - <% $cgi->param('delay') ? 'CHECKED' : '' %>> In the future + <% $cgi->param('delay') ? 'CHECKED' : '' %> \ + onclick="delay_changed()"> In the future <& /elements/input-date-field.html, { 'name' => 'start_date', 'value' => ($cgi->param('start_date') || $cust_main->next_bill_date), } &> + <IMG SRC="<%$fsurl%>images/calendar-disabled.png" \ + ID="start_date_button_disabled" STYLE="display:none"> </TD> </TR> </TABLE> |