@@ -115,7 +115,20 module ActionView #:nodoc: | |||
|
115 | 115 | |
|
116 | 116 | select_html(options[:field_name] || 'year', year_options, options[:prefix], options[:include_blank], options[:discard_type], options[:disabled]) |
|
117 | 117 | end |
|
118 | ||
|
118 | ||
|
119 | # added by JP Lang | |
|
120 | # select_html is a rails private method and changed in 1.2 | |
|
121 | # implementation added here for compatibility | |
|
122 | def select_html(type, options, prefix = nil, include_blank = false, discard_type = false, disabled = false) | |
|
123 | select_html = %(<select name="#{prefix || "date"}) | |
|
124 | select_html << "[#{type}]" unless discard_type | |
|
125 | select_html << %(") | |
|
126 | select_html << %( disabled="disabled") if disabled | |
|
127 | select_html << %(>\n) | |
|
128 | select_html << %(<option value=""></option>\n) if include_blank | |
|
129 | select_html << options.to_s | |
|
130 | select_html << "</select>\n" | |
|
131 | end | |
|
119 | 132 | end |
|
120 | 133 | |
|
121 | 134 | # The private method <tt>add_options</tt> is overridden so that "Please select" is localized. |
General Comments 0
You need to be logged in to leave comments.
Login now