pick/enter a location when ordering a package, RT#4499
[freeside.git] / httemplate / elements / select-county.html
index 8ef34db..59f235a 100644 (file)
@@ -14,6 +14,7 @@ Example:
     disabled      => 0, #bool
     disable_empty => 1, #defaults to 1, disable the empty option
     empty_label   => 'all', #label for empty option
+    style         => [ 'attribute:value', 'another:value' ],
   );
 
 </%doc>
@@ -79,6 +80,7 @@ Example:
           ID      = "<% $pre %>county"
           onChange= "<% $opt{'onchange'} %>"
           <% $opt{'disabled'} %>
+          <% $style %>
   >
 
 % unless ( $opt{'disable_empty'} ) {
@@ -123,6 +125,12 @@ $opt{'disable_empty'} = 1 unless exists($opt{'disable_empty'});
 
 my $pre = $opt{'prefix'};
 
+$opt{'style'} ||= [];
+my $style =
+  scalar(@{$opt{style}})
+    ? 'STYLE="'. join(';', @{$opt{style}}). '"'
+    : '';
+
 my @counties = ();
 if ( $countyflag ) {