Sha256: 3131f78af77b30c1c315fcd471f882a468ec227842733c7bd8659719033d75e0
Contents?: true
Size: 1.15 KB
Versions: 16
Compression:
Stored size: 1.15 KB
Contents
module JqueryUiForm module Helpers module WrapperHelper def wrapper(*args, &block) html_options = args.extract_options! html_options[:class] = "#{html_options[:class]} ui-form-#{html_options.delete(:mode) || 'wrapper'}" template.content_tag(:div, html_options) do yield end end def fieldset(*args, &block) legend = "" legend = args.shift unless args.first.is_a?(Hash) html_options = args.extract_options! html_options[:class] = "#{html_options[:class]} ui-fieldset" template.content_tag(:fieldset,html_options) do template.concat(template.content_tag(:legend, legend, html_options[:html_legend])) unless legend.blank? yield end end def column(options = {}, &block) options[:mode] = "column" wrapper(options, &block) end def row(options = {}, &block) options[:mode] = "row" wrapper(options, &block) end def buttons(options = {}, &block) options[:mode] = "buttons" wrapper(options, &block) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems