Sha256: 8f51f323d258e43c397492afa7eab2446490b8b58d9ae7a68f7af4cdae75c18b

Contents?: true

Size: 627 Bytes

Versions: 127

Compression:

Stored size: 627 Bytes

Contents

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', data: { method: :delete, remote: true, confirm: "Really delete<br>#{object}?".html_safe } }
      end

      def border?
        false
      end

    end
  end
end

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
effective_bootstrap-0.7.4 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.7.3 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.7.2 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.7.1 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.7.0 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.31 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.30 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.29 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.28 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.27 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.26 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.25 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.24 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.23 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.22 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.21 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.20 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.19 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.18 app/models/effective/form_inputs/delete.rb
effective_bootstrap-0.6.17 app/models/effective/form_inputs/delete.rb