Sha256: 8ad973bf87f6abea7d0f5436fbbe685f728ce22887325f4bff98cca06d79ee57

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 KB

Contents

= form_for [@block, @layer], html: {class: 'form-horizontal'} do |f|
  %fieldset
    %legend= caption

    - if @layer.errors.any?
      #error_explanation
        %h2= "#{pluralize(@layer.errors.count, "error")} prohibited this layer from being saved:"
        %ul
          - @layer.errors.full_messages.each do |msg|
            %li= msg

  = render partial: 'flms/layers/common_fields', locals: { form_block: f }

  %fieldset
    %legend
      Image
    .control-group
      = f.label :image, class: 'control-label'
      .controls
        = f.file_field :image
        = f.hidden_field :image_cache
        - if @layer.image?
          .image-preview
            = image_tag @layer.image.small.url
            %br
            = @layer.uploaded_filename

    .control-group
      = f.label :image_display_mode, class: 'control-label'
      .controls
        .input-append
          = f.select :image_display_mode, Flms::Layer::IMAGE_DISPLAY_MODES


  = render partial: 'flms/layers/keyframe_fields', locals: { form_block: f }

  .control-group
    .controls
      .actions
        = f.submit class: 'btn btn-primary'
             
        = link_to 'Cancel', edit_block_path(@block)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flms-0.9.0 app/views/flms/image_layers/_form.html.haml
flms-0.1.0 app/views/flms/image_layers/_form.html.haml