Sha256: 90607fabbbe0a7ad0d767cc4c08d695bb76b8679f79537bf5f45c276c3c00db3
Contents?: true
Size: 1.03 KB
Versions: 64
Compression:
Stored size: 1.03 KB
Contents
module BootstrapForm module Helpers module Bootstrap4 def submit(name = nil, options = {}) options.reverse_merge! class: 'btn btn-secondary' super(name, options) end # TODO check upstream - append tag options def prepend_and_append_input(name, options, &block) options = options.extract!(:prepend, :append, :input_group_class, :append_tag, :input_group) input_group_class = ["input-group", options[:input_group_class]].compact.join(' ') input = capture(&block) || "".html_safe input = content_tag(:div, input_group_content(options[:prepend]), class: 'input-group-prepend') + input if options[:prepend] input << content_tag(:div, input_group_content(options[:append]), (options[:append_tag] || {}).merge(class: 'input-group-append')) if options[:append] input << generate_error(name) input = content_tag(:div, input, (options[:input_group] || {}).merge(class: input_group_class)) unless options.empty? input end end end end
Version data entries
64 entries across 64 versions & 1 rubygems