view app/views/custom_fields/new.html.erb @ 1524:82fac3dcf466 redmine-2.5-integration

Fix failure to interpret Javascript when autocompleting members for project
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 11 Sep 2014 10:24:38 +0100
parents dffacf8a6908
children
line wrap: on
line source
<%= title [l(:label_custom_field_plural), custom_fields_path],
  [l(@custom_field.type_name), custom_fields_path(:tab => @custom_field.class.name)],
  l(:label_custom_field_new) %>

<%= 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 %>