diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-08-07 16:58:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-08-07 16:58:51 +0000 |
commit | 599736aca7b9b5bd47d39fdf72c9fc1127730497 (patch) | |
tree | 1aabc950dccab01b701b45c43a13cee79b491fbe /app/views/custom_fields/new.html.erb | |
parent | 1749fbf3e6169c7aa304c967ab4ff7ea4217e61e (diff) | |
download | redmine-599736aca7b9b5bd47d39fdf72c9fc1127730497.tar.gz redmine-599736aca7b9b5bd47d39fdf72c9fc1127730497.zip |
Update the new custom field form with remotely.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10163 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/custom_fields/new.html.erb')
-rw-r--r-- | app/views/custom_fields/new.html.erb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/views/custom_fields/new.html.erb b/app/views/custom_fields/new.html.erb index cde4fab58..71e7197ec 100644 --- a/app/views/custom_fields/new.html.erb +++ b/app/views/custom_fields/new.html.erb @@ -2,8 +2,18 @@ » <%= link_to l(@custom_field.type_name), :controller => 'custom_fields', :action => 'index', :tab => @custom_field.class.name %> » <%= l(:label_custom_field_new) %></h2> -<%= labelled_form_for :custom_field, @custom_field, :url => custom_fields_path do |f| %> +<%= 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 %> <%= submit_tag l(:button_save) %> <% 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() + }); +}); +<% end %> |