diff options
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/elements/select-country.html | 16 | ||||
-rwxr-xr-x | httemplate/search/cust_main.html | 3 | ||||
-rwxr-xr-x | httemplate/search/report_cust_main.html | 32 |
3 files changed, 47 insertions, 4 deletions
diff --git a/httemplate/elements/select-country.html b/httemplate/elements/select-country.html index e5656dc0c..724afe318 100644 --- a/httemplate/elements/select-country.html +++ b/httemplate/elements/select-country.html @@ -2,7 +2,7 @@ Example: - include( '/elements/select-country.html', + <& /elements/select-country.html, #recommended country => $current_country, @@ -14,9 +14,15 @@ Example: empty_label => 'all', #label for empty option disable_stateupdate => 0, #bool - disabled update of the select-state.html style => [ 'attribute:value', 'another:value' ], - ); + + state_disable_empty => 1, #defaults to 1, disable the state empty option + state_empty_label => 'all', #label for state empty option + &> </%doc> +% #maybe this makes more sense in select-state.html? +% # (county update is in select-county... and we wouldn't have to pass "state_" +% # options) % unless ( $opt{'disable_stateupdate'} ) { <% include('/elements/xmlhttp.html', @@ -45,10 +51,14 @@ Example: // add the new states var statesArray = eval('(' + states + ')' ); +% unless ( $opt{'disable_empty'} ) { + statesArray.unshift('', ''); +% } + for ( var s = 0; s < statesArray.length; s=s+2 ) { var stateLabel = statesArray[s+1]; if ( stateLabel == "" ) - stateLabel = '(n/a)'; + stateLabel = <% $opt{state_empty_label} || '(n/a)' |js_string %>; opt(what.form.<% $pre %>state, statesArray[s], stateLabel); } diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html index c0292aab2..a30746307 100755 --- a/httemplate/search/cust_main.html +++ b/httemplate/search/cust_main.html @@ -41,7 +41,8 @@ my %search_hash = (); #scalars my @scalars = qw ( - agentnum salesnum status address zip paydate_year paydate_month invoice_terms + agentnum salesnum status address county state zip country + paydate_year paydate_month invoice_terms no_censustract with_geocode with_email POST no_POST custbatch usernum cancelled_pkgs diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html index 4309fbb7f..16a8122e8 100755 --- a/httemplate/search/report_cust_main.html +++ b/httemplate/search/report_cust_main.html @@ -43,6 +43,27 @@ <TD ALIGN="right" VALIGN="center"><% mt('Address') |h %></TD> <TD><INPUT TYPE="text" NAME="address" SIZE=54></TD> </TR> + + <TR> + <TD ALIGN="right" VALIGN="center"><% mt('County') |h %></TD> + <TD> + <& /elements/select-county.html, + disable_empty => 0, + empty_label => '(all)', + &> + </TD> + </TR> + + + <TR> + <TD ALIGN="right" VALIGN="center"><% mt('State') |h %></TD> + <TD> + <& /elements/select-state.html, + disable_empty => 0, + empty_label => '(all)', + &> + </TD> + </TR> <TR> <TD ALIGN="right" VALIGN="center"><% mt('Zip') |h %></TD> @@ -50,6 +71,17 @@ </TR> <TR> + <TD ALIGN="right" VALIGN="center"><% mt('Country') |h %></TD> + <TD> + <& /elements/select-country.html, + disable_empty => 0, + state_disable_empty => 0, + state_empty_label => '(all)', + &> + </TD> + </TR> + + <TR> <TD ALIGN="right" VALIGN="center"><% mt('Signup date') |h %></TD> <TD> <TABLE> |