Sha256: 12b0da7abb07e2dc0962c9a46ab685fadac83bfb05c7330053f4ea879ef54907
Contents?: true
Size: 832 Bytes
Versions: 35
Compression:
Stored size: 832 Bytes
Contents
-# frozen_string_literal: true - disabled ||= false - subquestion ||= false - cls = [question.type] - cls << "subinput" if subquestion - placeholders = Quby::Questionnaires::Entities::Questions::DateQuestion::COMPONENT_PLACEHOLDERS - default_date_keys = Quby::Questionnaires::Entities::Questions::DateQuestion::COMPONENT_KEYS - components = question.components.sort - components.each do |component| - size = component == :year ? 5 : 3 - key = question.send("#{component}_key") = text_field :answer, key, placeholder: translate(placeholders[component]), size: size, | autocomplete: question.autocomplete, class: cls, disabled: disabled ? "" : nil, | data: {field: {key: key}, "default-date-key" => default_date_keys[component], | required: question.required_components.include?(component)} |
Version data entries
35 entries across 35 versions & 1 rubygems