Sha256: d88724dd273a17962f7d7c4f33c57a0bf200fa8e789e6c51bf290e7df0764514

Contents?: true

Size: 1.13 KB

Versions: 24

Compression:

Stored size: 1.13 KB

Contents

= form_for [@template, @field] do |f|
  - if @field.errors.any?
    .alert.alert-error.fade.in.span12
      = link_to '×', '#', class: 'close', 'data-dismiss' => 'alert'
      - @field.errors.full_messages.each do |m|
        = m

  .form-horizontal
    .control-group
      = f.label :name, class: 'control-label'
      .controls= f.text_field :name, class: 'span4'

    .control-group
      = f.label :code_name, class: 'control-label'
      .controls= f.text_field :code_name, class: 'span4'
      = f.hidden_field :template_id, value: @template.id, class: 'span4'

    - unless @field.type_value == 'image'
      .control-group
        = f.label :type_value, class: 'control-label'
        .controls
          = f.select :type_value, options_for_select(types_value, selected: @field.type_value), class: 'span4'

    .row-fluid
      .span12
        .form-actions
          = f.submit class: 'btn btn-primary'
          = link_to t(:cancel), edit_template_path(@template), class: 'btn'
          = link_to t(:delete_field), [@template, @field], method: :delete, data: {confirm: t(:are_you_sure?)}, class: 'btn btn-danger pull-right' unless @field.new_record?

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
constructor-pages-0.9.1 app/views/constructor_pages/fields/_form.html.slim
constructor-pages-0.9.0 app/views/constructor_pages/fields/_form.html.slim
constructor-pages-0.8.19 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.18 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.17 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.16 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.15 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.14 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.13 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.12 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.11 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.10 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.8 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.7 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.6 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.5 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.4 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.3 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.2 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.8.1 app/views/constructor_pages/fields/_form.haml