X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_pkg.html;h=556177c8a27db35e23762da8bddada722548b696;hp=27aececc944e8d6d904dd6ffb5a50c19c1d8b123;hb=b49e60810267101b83b9b2133e5dfc90d1663cdc;hpb=09af85fc0e7a48392c930c9672a99448cf9630d4 diff --git a/httemplate/search/report_cust_pkg.html b/httemplate/search/report_cust_pkg.html index 27aececc9..556177c8a 100755 --- a/httemplate/search/report_cust_pkg.html +++ b/httemplate/search/report_cust_pkg.html @@ -80,6 +80,7 @@ what.form.<% $field %>_beginning_text.disabled = true; what.form.<% $field %>_ending_text.disabled = true; + what.form.<% $field %>_null.disabled = true; what.form.<% $field %>_beginning_text.style.backgroundColor = '#dddddd'; what.form.<% $field %>_ending_text.style.backgroundColor = '#dddddd'; @@ -90,15 +91,21 @@ % } else { - what.form.<% $field %>_beginning_text.disabled = false; - what.form.<% $field %>_ending_text.disabled = false; - what.form.<% $field %>_beginning_text.style.backgroundColor = '#ffffff'; - what.form.<% $field %>_ending_text.style.backgroundColor = '#ffffff'; + what.form.<% $field %>_null.disabled = false; - what.form.<% $field %>_beginning_button.style.display = ''; - what.form.<% $field %>_ending_button.style.display = ''; - what.form.<% $field %>_beginning_disabled.style.display = 'none'; - what.form.<% $field %>_ending_disabled.style.display = 'none'; + if ( ! what.form.<% $field %>_null.checked ) { + + what.form.<% $field %>_beginning_text.disabled = false; + what.form.<% $field %>_ending_text.disabled = false; + what.form.<% $field %>_beginning_text.style.backgroundColor = '#ffffff'; + what.form.<% $field %>_ending_text.style.backgroundColor = '#ffffff'; + + what.form.<% $field %>_beginning_button.style.display = ''; + what.form.<% $field %>_ending_button.style.display = ''; + what.form.<% $field %>_beginning_disabled.style.display = 'none'; + what.form.<% $field %>_ending_disabled.style.display = 'none'; + + } % } % } @@ -109,6 +116,37 @@ } +% foreach my $field (@date_fields) { + + function <% $field %>_null_changed(what) { + + if ( what.checked ) { + what.form.<% $field %>_beginning_text.disabled = true; + what.form.<% $field %>_ending_text.disabled = true; + what.form.<% $field %>_beginning_text.style.backgroundColor = '#dddddd'; + what.form.<% $field %>_ending_text.style.backgroundColor = '#dddddd'; + what.form.<% $field %>_beginning_button.style.display = 'none'; + what.form.<% $field %>_ending_button.style.display = 'none'; + what.form.<% $field %>_beginning_disabled.style.display = ''; + what.form.<% $field %>_ending_disabled.style.display = ''; + + } else { + what.form.<% $field %>_beginning_text.disabled = false; + what.form.<% $field %>_ending_text.disabled = false; + what.form.<% $field %>_beginning_text.style.backgroundColor = '#ffffff'; + what.form.<% $field %>_ending_text.style.backgroundColor = '#ffffff'; + + what.form.<% $field %>_beginning_button.style.display = ''; + what.form.<% $field %>_ending_button.style.display = ''; + what.form.<% $field %>_beginning_disabled.style.display = 'none'; + what.form.<% $field %>_ending_disabled.style.display = 'none'; + + } + + } + +% } + <& /elements/tr-select-pkg_class.html, @@ -135,6 +173,7 @@ From date (m/d/y) To date (m/d/y) + Empty date % my $noinit = 0; % foreach my $field (@date_fields) { @@ -152,6 +191,13 @@ % $noinit = 1; % } + + <& /elements/checkbox.html, + 'field' => $field.'_null', + 'value' => 'Y', + 'onchange' => $field.'_null_changed', + &> + % } #foreach $field