Sha256: e77c3baa71675f9d44222e9c6121cdc9620bcc34cabd58d5ccad82bd21dd59a2

Contents?: true

Size: 1.12 KB

Versions: 13

Compression:

Stored size: 1.12 KB

Contents

= form_for @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: @field.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_url(@field.template), class: 'btn'
          = link_to t(:delete_field), @field, method: :delete, data: {confirm: t(:are_you_sure?)}, class: 'btn btn-danger pull-right' unless @field.new_record?

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
constructor-pages-0.7.7 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.7.6 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.7.5 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.7.4 app/views/constructor_pages/fields/_form.haml
constructor-pages-0.7.3 pages/app/views/constructor_pages/fields/_form.haml
constructor-core-0.7.3 pages/app/views/constructor_pages/fields/_form.haml
constructor-cms-0.7.3 pages/app/views/constructor_pages/fields/_form.haml
constructor-pages-0.7.2 pages/app/views/constructor_pages/fields/_form.haml
constructor-core-0.7.2 pages/app/views/constructor_pages/fields/_form.haml
constructor-cms-0.7.2 pages/app/views/constructor_pages/fields/_form.haml
constructor-core-0.7.1 pages/app/views/constructor_pages/fields/_form.haml
constructor-pages-0.7.0 app/views/constructor_pages/fields/_form.haml
constructor-cms-0.7.0 pages/app/views/constructor_pages/fields/_form.haml