Sha256: 461da32cafe0073a2afca6898ae8c2c2f4f0ce3f5a27844aee88df82ff3a4513

Contents?: true

Size: 555 Bytes

Versions: 8

Compression:

Stored size: 555 Bytes

Contents

require 'bh/helpers/form/base_helper'

module Bh
  module Form
    module SubmitHelper
      include BaseHelper

      def submit(value=nil, options={})
        context = options.delete(:context) || 'primary'
        append_class! options, "btn btn-#{context}"
        if horizontal_form?
          content_tag :div, class: 'form-group' do
            content_tag :div, class: 'col-sm-offset-3 col-sm-9' do
              super value, options
            end
          end
        else
          super value, options
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bh-1.1.1 lib/bh/helpers/form/submit_helper.rb
bh-1.1.0 lib/bh/helpers/form/submit_helper.rb
bh-1.0.1 lib/bh/helpers/form/submit_helper.rb
bh-1.0.0 lib/bh/helpers/form/submit_helper.rb
bh-0.0.8 lib/bh/helpers/form/submit_helper.rb
bh-0.0.7 lib/bh/helpers/form/submit_helper.rb
bh-0.0.6 lib/bh/helpers/form/submit_helper.rb
bh-0.0.5 lib/bh/helpers/form/submit_helper.rb