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