new.html.erb
19 lines
| 796 B
| text/plain
|
TextLexer
|
r3030 | <h2><%= link_to l(:label_custom_field_plural), :controller => 'custom_fields', :action => 'index' %> | ||
|
r6177 | » <%= link_to l(@custom_field.type_name), :controller => 'custom_fields', :action => 'index', :tab => @custom_field.class.name %> | ||
|
r3030 | » <%= l(:label_custom_field_new) %></h2> | ||
|
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 %> | ||||
<%= submit_tag l(:button_save) %> | ||||
<% end %> | ||||
|
r9980 | |||
<%= javascript_tag do %> | ||||
$('#custom_field_field_format').change(function(){ | ||||
$.ajax({ | ||||
url: '<%= new_custom_field_path(:format => 'js') %>', | ||||
type: 'get', | ||||
data: $('#custom_field_form').serialize() | ||||
}); | ||||
}); | ||||
<% end %> | ||||