summaryrefslogtreecommitdiffstats
path: root/app/views/custom_fields/new.html.erb
blob: db422296b3c170cdceb5b5160fcff03f418599ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<%= custom_field_title @custom_field %>

<%= labelled_form_for :custom_field, @custom_field, :url => custom_fields_path, :html => {:id => 'custom_field_form'} do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= hidden_field_tag 'type', @custom_field.type %>
<% end %>

<%= javascript_tag do %>
$('#custom_field_field_format').change(function(){
  $.ajax({
    url: '<%= new_custom_field_path(:format => 'js') %>',
    type: 'get',
    data: $('#custom_field_form').serialize(),
    complete: toggleDisabledInit
  });
});
<% end %>