Skip to content

Commit

Permalink
state_class option on country widget now works -- half-baked feature …
Browse files Browse the repository at this point in the history
…was never functional.
  • Loading branch information
Josh Lavin committed May 21, 2014
1 parent 5bdb9f5 commit 8a9a01e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/Widget/country_select.widget
Expand Up @@ -196,6 +196,7 @@ EOF

my $extra = $opt->{state_extra} ? " $opt->{state_extra}" : '';
my $state_js = $opt->{state_js} ? "; $opt->{state_js}" : '';
my $state_class = $opt->{state_class} ? "$opt->{state_class}" : '';
my $country_js = $opt->{country_js} ? "; $opt->{country_js}" : '';
for ($state_js, $country_js) { s|\bthis\.form\b|$v_formv|g }

Expand Down Expand Up @@ -230,7 +231,7 @@ EOF
}
var stary = $v_state_tary\[country];

var str = '<select name="$svar_in" id="$svar_in" onChange="$v_formv.$svar.value = this.value$state_js"$extra>';
var str = '<select name="$svar_in" id="$svar_in" onChange="$v_formv.$svar.value = this.value$state_js" class="$state_class"$extra>';
for(var i = 0; i < svary.length; i++) {
str += '<option value="' + svary[i] + '"';
if(svary[i] == sval)
Expand Down

0 comments on commit 8a9a01e

Please sign in to comment.