# File lib/merb-helpers/form/builder.rb, line 301 def label(contents, attrs = {}) if contents if contents.is_a?(Hash) label_attrs = contents contents = label_attrs.delete(:title) else label_attrs = attrs end tag(:label, contents, label_attrs) else "" end end
# File lib/merb-helpers/form/builder.rb, line 367 def submit(value, attrs = {}) unbound_label(attrs) + super end
# File lib/merb-helpers/form/builder.rb, line 340 def unbound_check_box(attrs = {}) label_text = unbound_label(attrs) super + label_text end
# File lib/merb-helpers/form/builder.rb, line 323 def unbound_label(attrs = {}) if attrs[:id] label_attrs = {:for => attrs[:id]} elsif attrs[:name] label_attrs = {:for => attrs[:name]} else label_attrs = {} end label_option = attrs.delete(:label) if label_option.is_a? Hash label(label_attrs.merge(label_option)) else label(label_option, label_attrs) end end
Generated with the Darkfish Rdoc Generator 2.