Sha256: 7e77237990d7197a81aad7db56ca2b60923f9c878a140837412fdaf92a4014dc

Contents?: true

Size: 579 Bytes

Versions: 12

Compression:

Stored size: 579 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Forms
    module Dsl
      # :nodoc:
      class HiddenInput < Input
        attr_reader :name

        def initialize(name:, **system_arguments)
          @name = name
          super(**system_arguments)
        end

        def to_component
          HiddenField.new(input: self)
        end

        def label
          nil
        end

        def type
          :hidden
        end

        def supports_validation?
          false
        end

        def hidden?
          true
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
primer_view_components-0.36.5 app/lib/primer/forms/dsl/hidden_input.rb
openproject-primer_view_components-0.52.2 app/lib/primer/forms/dsl/hidden_input.rb
primer_view_components-0.36.4 app/lib/primer/forms/dsl/hidden_input.rb
openproject-primer_view_components-0.52.1 app/lib/primer/forms/dsl/hidden_input.rb
openproject-primer_view_components-0.52.0 app/lib/primer/forms/dsl/hidden_input.rb
primer_view_components-0.36.3 app/lib/primer/forms/dsl/hidden_input.rb
openproject-primer_view_components-0.51.0 app/lib/primer/forms/dsl/hidden_input.rb
primer_view_components-0.36.2 app/lib/primer/forms/dsl/hidden_input.rb
openproject-primer_view_components-0.50.1 app/lib/primer/forms/dsl/hidden_input.rb
openproject-primer_view_components-0.50.0 app/lib/primer/forms/dsl/hidden_input.rb
primer_view_components-0.36.1 app/lib/primer/forms/dsl/hidden_input.rb
primer_view_components-0.36.0 app/lib/primer/forms/dsl/hidden_input.rb