Sha256: 29a95eeace3cc788088a212efba1e44786b0db855a040cd9f5aef270fe8b35d0

Contents?: true

Size: 1.17 KB

Versions: 22

Compression:

Stored size: 1.17 KB

Contents

- @field ||= CustomField.new
- field_group_id ||= @field.field_group_id
- new_field = @field.id.nil?
- url = new_field ? admin_fields_path : admin_field_path
- html_id = new_field ? nil : "edit_field_#{@field.id}"

%div{:class => new_field ? nil : 'remote edit_field'}
  = form_for([:admin, @field], :url => url, :as => :field, :html => {:class => nil, :id => html_id}, :remote => true) do |f|
    = link_to( 'x', '#', :class => 'close', :title => t(:close_form) )
    = f.error_messages

    = hidden_field_tag 'field[field_group_id]', field_group_id, :id => nil

    .section
      %table
        %tr
          %td
            .label.top.req Field label:
            = f.text_field :label, :id => nil

          %td= spacer
          %td
            .label.top.req Field type:
            = select :field, :as, field_edit_as_options(@field), :include_blank => true, :id => nil

      .subform
        = render(:partial => 'admin/fields/subform') unless new_field

    .buttonbar
      - if new_field
        = f.submit t(:create_field), :id => :field_submit
      - else
        = f.submit t(:save_field), :id => :field_submit
      or
      = link_to( t(:cancel), '#', :class => 'cancel' )

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 app/views/admin/fields/_form.html.haml
fat_free_crm-0.15.2 app/views/admin/fields/_form.html.haml
fat_free_crm-0.16.4 app/views/admin/fields/_form.html.haml
fat_free_crm-0.14.1 app/views/admin/fields/_form.html.haml
fat_free_crm-0.15.1 app/views/admin/fields/_form.html.haml
fat_free_crm-0.16.3 app/views/admin/fields/_form.html.haml
fat_free_crm-0.16.2 app/views/admin/fields/_form.html.haml
fat_free_crm-0.16.1 app/views/admin/fields/_form.html.haml
fat_free_crm-0.16.0 app/views/admin/fields/_form.html.haml
fat_free_crm-0.15.0 app/views/admin/fields/_form.html.haml
fat_free_crm-0.15.0.beta.2 app/views/admin/fields/_form.html.haml
fat_free_crm-0.15.0.beta app/views/admin/fields/_form.html.haml
fat_free_crm-0.14.0 app/views/admin/fields/_form.html.haml
reduced_fat_crm-0.15.0.beta app/views/admin/fields/_form.html.haml
reduced_fat_crm-0.14.0 app/views/admin/fields/_form.html.haml
fat_free_crm-0.13.6 app/views/admin/fields/_form.html.haml
fat_free_crm-0.13.5 app/views/admin/fields/_form.html.haml
fat_free_crm-0.13.4 app/views/admin/fields/_form.html.haml
fat_free_crm-0.13.3 app/views/admin/fields/_form.html.haml
fat_free_crm-0.13.2 app/views/admin/fields/_form.html.haml