diff options
Diffstat (limited to 'httemplate/elements/select-country.html')
-rw-r--r-- | httemplate/elements/select-country.html | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/httemplate/elements/select-country.html b/httemplate/elements/select-country.html index c4368c271..45b0ccd5f 100644 --- a/httemplate/elements/select-country.html +++ b/httemplate/elements/select-country.html @@ -13,7 +13,7 @@ Example: disable_empty => 1, #defaults to 1, disable the empty option empty_label => 'all', #label for empty option disable_stateupdate => 0, #bool - disabled update of the select-state.html - + style => [ 'attribute:value', 'another:value' ], ); </%doc> @@ -70,6 +70,7 @@ Example: ID = "<% $pre %>country" onChange = "<% $onchange %>" <% $opt{'disabled'} %> + <% $style %> > % unless ( $opt{'disable_empty'} ) { @@ -101,6 +102,12 @@ my $onchange = ( $opt{'disable_stateupdate'} ? '' : $pre.'country_changed(this); ' ). $opt{'onchange'}; +$opt{'style'} ||= []; +my $style = + scalar(@{$opt{style}}) + ? 'STYLE="'. join(';', @{$opt{style}}). '"' + : ''; + my $conf = new FS::Conf; my $default = $conf->config('countrydefault') || 'US'; |