OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/lib/widget/settings/fieldset.rb

15 lines
455 B

class Widget::Settings::Fieldset < Widget::Base
def render_with_options(options, &block)
@type = options.delete(:type) || "filter"
@id = "#{@type}-settings"
@label = :"label_#{@type}"
super(options, &block)
end
def render
content_tag :fieldset, :id => @id, :class => "collapsible collapsed" do
html = content_tag :legend, l(@label), :onclick => "toggleFieldset(this);" #FIXME: onclick
html + yield
end
end
end