Sha256: f555d3436227288af1c78af2f8fa6116833a994991451bed385716a7a2f09d1a
Contents?: true
Size: 1014 Bytes
Versions: 8
Compression:
Stored size: 1014 Bytes
Contents
- hash = {} - hash[:style] = 'display: none;' if value.nil? - hash['data-required'] = 'required' - hash[:name] = name unless value.nil? - hash['disabled'] = 'disabled' if @submit.is_complete? - case type - when 'Formily::TextInput' - hash[:value] = value %input{hash, type: :text} - when 'Formily::TextareaInput' %textarea{hash} = value unless value.nil? - when 'Formily::MultipleFileInput' .row.formily-input{style: "#{'display: none;' if value.nil? }"} .columns.large-12 %button{type: :button, 'data-f-multiple' => :multiple} Upload File %span - hash[:name] = hash[:name] + '[]' unless value.nil? %input{hash, type: :file, multiple: :multiple, style: 'display: none'} .formily-files-container - files = Formily::MultipleFileInput.new(id: input_id).get_value_from_submit(@submit) -if files.present? = render partial: 'formily/partial/inputs/file_preview', locals: {files: files}
Version data entries
8 entries across 8 versions & 1 rubygems