new.html.erb
17 lines
| 550 B
| text/plain
|
TextLexer
|
r14369 | <%= custom_field_title @custom_field %> | ||
|
r2 | |||
|
r9980 | <%= labelled_form_for :custom_field, @custom_field, :url => custom_fields_path, :html => {:id => 'custom_field_form'} do |f| %> | ||
|
r97 | <%= render :partial => 'form', :locals => { :f => f } %> | ||
<%= hidden_field_tag 'type', @custom_field.type %> | ||||
<% end %> | ||||
|
r9980 | |||
<%= javascript_tag do %> | ||||
$('#custom_field_field_format').change(function(){ | ||||
$.ajax({ | ||||
url: '<%= new_custom_field_path(:format => 'js') %>', | ||||
type: 'get', | ||||
|
r12125 | data: $('#custom_field_form').serialize(), | ||
complete: toggleDisabledInit | ||||
|
r9980 | }); | ||
}); | ||||
<% end %> | ||||