Sha256: 29f70ffe3250bb167a68dbfe444ed6519ba98015a7a765f27962e2f4b9214b48
Contents?: true
Size: 708 Bytes
Versions: 113
Compression:
Stored size: 708 Bytes
Contents
# frozen_string_literal: true module Effective module FormInputs class Delete < Submit def build_input(&block) tags = [ icon('check', style: 'display: none;'), icon('x', style: 'display: none;'), icon('spinner'), (block_given? ? capture(&block) : content_tag(:a, name, options[:input])) ] (left? ? tags.reverse.join : tags.join).html_safe end def input_html_options { class: 'btn btn-warning', id: tag_id, data: { method: :delete, remote: true, confirm: "Really delete<br>#{object}?".html_safe } } end def border? false end end end end
Version data entries
113 entries across 113 versions & 1 rubygems