Class | Cms::FormBuilder |
In: |
app/helpers/cms/form_builder.rb
|
Parent: | ActionView::Helpers::FormBuilder |
# File app/helpers/cms/form_builder.rb, line 45 45: def cms_drop_down(method, choices, options={}, html_options={}) 46: add_tabindex!(html_options) 47: cms_options = options.extract!(:label, :instructions) 48: render_cms_form_partial :drop_down, 49: :object_name => @object_name, :method => method, 50: :choices => choices, :options => options, 51: :cms_options => cms_options, :html_options => html_options 52: end
# File app/helpers/cms/form_builder.rb, line 54 54: def cms_tag_list(options={}) 55: add_tabindex!(options) 56: cms_options = options.extract!(:label, :instructions) 57: render_cms_form_partial :tag_list, 58: :options => options, :cms_options => cms_options 59: end
# File app/helpers/cms/form_builder.rb, line 61 61: def cms_text_editor(method, options = {}) 62: add_tabindex!(options) 63: cms_options = options.extract!(:label, :instructions) 64: render_cms_form_partial :text_editor, 65: :id => (options[:id] || "#{@object_name}_#{method}"), 66: :editor_enabled => (cookies["editorEnabled"].blank? ? true : (cookies["editorEnabled"] == 'true' || cookies["editorEnabled"] == ['true'])), 67: :object_name => @object_name, :method => method, 68: :options => options, :cms_options => cms_options 69: end
# File app/helpers/cms/form_builder.rb, line 18 18: def date_picker(method, options={}) 19: text_field(method, {:size => 10, :class => "date_picker"}.merge(options)) 20: end
A JavaScript/CSS styled select
# File app/helpers/cms/form_builder.rb, line 6 6: def drop_down(method, choices, options = {}, html_options = {}) 7: @template.drop_down(@object_name, method, choices, objectify_options(options), add_tabindex!(@default_options.merge(html_options))) 8: end
# File app/helpers/cms/form_builder.rb, line 22 22: def tag_list(options={}) 23: field_name = options.delete(:name) || :tag_list 24: text_field(field_name, {:size => 50, :class => "tag-list"}.merge(options)) 25: end