Sha256: fc2f732acfee3c0198482ba5cee0645ffc08f26054b80ecdbeb3a29826214e7e

Contents?: true

Size: 1.06 KB

Versions: 7

Compression:

Stored size: 1.06 KB

Contents

#require 'simple_form'

#module WrappedButton
#  def wrapped_button(*args, &block)
#    template.content_tag :div, class: "form-actions" do
#      options = args.extract_options!
#      loading = self.object.new_record? ? I18n.t('simple_form.creating') : I18n.t('simple_form.updating')
#      options[:"data-loading-text"] = [loading, options[:"data-loading-text"]].compact
#      options[:class] = ['btn-primary', options[:class]].compact
#      args << options
#      if cancel = options.delete(:cancel)
#        submit(*args, &block) + ' ' + template.link_to(I18n.t('simple_form.buttons.cancel'), cancel, class: 'btn')
#      else
#        submit(*args, &block)
#      end
#    end
#  end
#end
#SimpleForm::FormBuilder.send :include, WrappedButton
#
#::SimpleForm::Inputs::CollectionRadioButtonsInput.class_exec do
#  def item_wrapper_class
#    "radio #{options.delete(:item_wrapper_class) || 'inline'}"
#  end
#end
#
#::SimpleForm::Inputs::CollectionCheckBoxesInput.class_exec do
#  def item_wrapper_class
#    "radio #{options.delete(:item_wrapper_class) || 'inline'}"
#  end
#end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ab_admin-0.3.6 lib/ab_admin/hooks/simple_form_hooks.rb
ab_admin-0.3.5 lib/ab_admin/hooks/simple_form_hooks.rb
ab_admin-0.3.4 lib/ab_admin/hooks/simple_form_hooks.rb
ab_admin-0.3.3 lib/ab_admin/hooks/simple_form_hooks.rb
ab_admin-0.3.2 lib/ab_admin/hooks/simple_form_hooks.rb
ab_admin-0.3.1 lib/ab_admin/hooks/simple_form_hooks.rb
ab_admin-0.3.0 lib/ab_admin/hooks/simple_form_hooks.rb