Sha256: 2a1a94e0d584d7ca7c42d64abe627583d4c5adb71f10983aba970d2c99e63eab
Contents?: true
Size: 1.4 KB
Versions: 6
Compression:
Stored size: 1.4 KB
Contents
# frozen_string_literal: true module PgAssociable class PgAssociableInlineInput < SimpleForm::Inputs::StringInput include ActionView::Helpers::FormTagHelper def hidden_input(wrapper_options = {}) merged_input_options = merge_wrapper_options(input_html_options, wrapper_options) # merged_input_options = merge_wrapper_options(merged_input_options, { class: 'oculto' }) @builder.hidden_field(attribute_name, merged_input_options) end def search_form(wrapper_options = nil) unless string? input_html_classes.unshift('string') # input_html_options[:type] ||= input_type if html5? end input_html_options[:type] = 'text' input_html_options[:data] = { url: options[:url_search] } input_html_options[:class] = 'form-control' input_html_options[:placeholder] = '' merged_input_options = merge_wrapper_options(input_html_options, wrapper_options) text_field_tag(nil, object.send(reflection.name).to_s, merged_input_options) end def limpiar(_wrapper_options = nil) content_tag('a', href: 'javascript:void(0)', class: 'limpiar', title: 'Limpiar', tabindex: '0', data: { action: 'asociable_inline#selectItem' }) do '<i class="bi bi-x-lg"></i>'.html_safe end end def pencil(_wrapper_options = nil) '<i tabindex="-1" class="bi bi-pencil pencil"></i>'.html_safe end end end
Version data entries
6 entries across 6 versions & 1 rubygems