Commit f89c00cc2d53aeeee497f5740fb6053327f47065
1 parent
785006ab
Exists in
master
and in
28 other branches
eraseing clonned methods on forms_helper.rb
someone copy/paste select_folder and select_profile_folder from one place to another on forms_helper.rb code
Showing
1 changed file
with
0 additions
and
32 deletions
Show diff stats
app/helpers/forms_helper.rb
| ... | ... | @@ -142,38 +142,6 @@ module FormsHelper |
| 142 | 142 | content_tag('table',rows.join("\n")) |
| 143 | 143 | end |
| 144 | 144 | |
| 145 | - def select_folder(label_text, field_id, collection, default_value=nil, html_options = {}, js_options = {}) | |
| 146 | - root = profile ? profile.identifier : _("root") | |
| 147 | - labelled_form_field( | |
| 148 | - label_text, | |
| 149 | - select_tag( | |
| 150 | - field_id, | |
| 151 | - options_for_select( | |
| 152 | - [[root, '']] + | |
| 153 | - collection.collect {|f| [ root + '/' + f.full_name, f.id ] }, | |
| 154 | - default_value | |
| 155 | - ), | |
| 156 | - html_options.merge(js_options) | |
| 157 | - ) | |
| 158 | - ) | |
| 159 | - end | |
| 160 | - | |
| 161 | - def select_profile_folder(label_text, field_id, profile, default_value='', html_options = {}, js_options = {}) | |
| 162 | - result = labelled_form_field( | |
| 163 | - label_text, | |
| 164 | - select_tag( | |
| 165 | - field_id, | |
| 166 | - options_for_select( | |
| 167 | - [[profile.identifier, '']] + | |
| 168 | - profile.folders.collect {|f| [ profile.identifier + '/' + f.full_name, f.id ] }, | |
| 169 | - default_value | |
| 170 | - ), | |
| 171 | - html_options.merge(js_options) | |
| 172 | - ) | |
| 173 | - ) | |
| 174 | - return result | |
| 175 | - end | |
| 176 | - | |
| 177 | 145 | def date_field(name, value, format = '%Y-%m-%d', datepicker_options = {}, html_options = {}) |
| 178 | 146 | datepicker_options[:disabled] ||= false |
| 179 | 147 | datepicker_options[:alt_field] ||= '' | ... | ... |