Sha256: efe3bc0bcd8f8d04b89439504297fd900bdeb9efd9e91590e1f63ac9fbb524da

Contents?: true

Size: 1.47 KB

Versions: 7

Compression:

Stored size: 1.47 KB

Contents

module WithPopup::Helpers::FormTagHelper
  include WithPopup::Helpers::Util

  def submit_with_popup_tag(value = 'Save changes', options = {})
    add_with_popup_option_to!(options)
    submit_tag(value, options)
  end

  def image_submit_with_popup_tag(source, options = {})
    add_with_popup_option_to!(options)
    image_submit_tag(source, options)
  end

  def button_with_popup_tag(content_or_options = nil, options = {}, &block)
    add_with_popup_option_to!(options)
    button_tag(content_or_options, options, &block)
  end

  def button_with_popup_to(name = nil, options = nil, html_options = {}, &block)
    add_with_popup_option_to!(html_options)
    button_to(name, options, html_options, &block)
  end

  def link_with_popup_to(name = nil, options = nil, html_options = {}, &block)
    add_with_popup_option_to!(html_options)
    link_to(name, options, html_options, &block)
  end

  def link_with_popup_to_if(condition, name, options = {}, html_options = {}, &block)
    add_with_popup_option_to!(html_options)
    link_to_if(condition, name, options, html_options, &block)
  end

  def link_with_popup_to_unless(condition, name, options = {}, html_options = {}, &block)
    add_with_popup_option_to!(html_options)
    link_to_unless(condition, name, options, html_options, &block)
  end

  def link_with_popup_to_unless_current(name, options = {}, html_options = {}, &block)
    add_with_popup_option_to!(html_options)
    link_to_unless_current(name, options, html_options, &block)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
with_popup-0.0.7 lib/with_popup/helpers/form_tag_helper.rb
with_popup-0.0.6 lib/with_popup/helpers/form_tag_helper.rb
with_popup-0.0.5 lib/with_popup/helpers/form_tag_helper.rb
with_popup-0.0.4 lib/with_popup/helpers/form_tag_helper.rb
with_popup-0.0.3 lib/with_popup/helpers/form_tag_helper.rb
with_popup-0.0.2 lib/with_popup/helpers/form_tag_helper.rb
with_popup-0.0.1 lib/with_popup/helpers/form_tag_helper.rb