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

Version Path
formily-0.0.5.6.5 app/views/formily/partial/inputs/_conditioned_fields.haml
formily-0.0.5.6.4 app/views/formily/partial/inputs/_conditioned_fields.haml
formily-0.0.5.6.3 app/views/formily/partial/inputs/_conditioned_fields.haml
formily-0.0.5.6.2 app/views/formily/partial/inputs/_conditioned_fields.haml
formily-0.0.5.6.1 app/views/formily/partial/inputs/_conditioned_fields.haml
formily-0.0.5.6.0 app/views/formily/partial/inputs/_conditioned_fields.haml
formily-0.0.5.5.9 app/views/formily/partial/inputs/_conditioned_fields.haml
formily-0.0.5.5.7 app/views/formily/partial/inputs/_conditioned_fields.haml