2013-07-28 15:50:18 +04:00
|
|
|
<%= 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) %>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2012-08-07 20:58:51 +04:00
|
|
|
<%= labelled_form_for :custom_field, @custom_field, :url => custom_fields_path, :html => {:id => 'custom_field_form'} do |f| %>
|
2006-12-17 17:22:09 +03:00
|
|
|
<%= render :partial => 'form', :locals => { :f => f } %>
|
|
|
|
<%= hidden_field_tag 'type', @custom_field.type %>
|
|
|
|
<% end %>
|
2012-08-07 20:58:51 +04:00
|
|
|
|
|
|
|
<%= javascript_tag do %>
|
|
|
|
$('#custom_field_field_format').change(function(){
|
|
|
|
$.ajax({
|
|
|
|
url: '<%= new_custom_field_path(:format => 'js') %>',
|
|
|
|
type: 'get',
|
2013-12-14 12:22:43 +04:00
|
|
|
data: $('#custom_field_form').serialize(),
|
|
|
|
complete: toggleDisabledInit
|
2012-08-07 20:58:51 +04:00
|
|
|
});
|
|
|
|
});
|
|
|
|
<% end %>
|